|
Hi I have developed an asp.net website.In my site there is a secured page in which there is a link of a confidential document(say confidential.pdf),which only authenticated users can download.Upto this point it's ok.
My problem is that whenever I go to google and search for confidential.pdf, it shows the link of my file and from there it's easily downloadable.I want to protect this.
Can anyone guide me?
Thanx and regards
ARINDAM
|
|
|
|
|
|
I have done what the link said.Still I am able to search that confidential file using google search.
ARINDAM
|
|
|
|
|
It takes some time for google's index to update itself. It doesn't actually search the entire web every time you click the button...
You might want to look at implementing a more secure authentication mechanism for your files.
|
|
|
|
|
I GridView I added the button "Send Mail"
Now "Send Mail" button starts appearing on each rows .
When i click on that button based on row value i want
do some processing .
Please tell in which event and how to do that.
Please help me to write start up code...
|
|
|
|
|
I think you can use Rowcommand event. This you have mentioned in the subject line also but have not mentioned that what exactly is the problem you are getting.
Apurva Kaushal
|
|
|
|
|
On RowDataBound event set some Id value to HiddenField in each row. And then on the button click event you can check for the hiddenField's value and then take appropriate action, meant particularly for that row.
|
|
|
|
|
I have a web application (ASP.NET 2.0) that is published on three servers (all working against one database). When I run the code below I got an ArgumentOutOfRangeException on just one of my webbservers. Very strange…
All tips of where to start finding the error source are welcomed. I’m running IIS 6.0 and .NET 2.0. It fells like a IIS configuration of handling exceptions… or?
public static DataRow Process(DataRow source0, DataRow source1, List<ProcessItemHandler> handlers)
{
DataRow target = source0.Table.NewRow();
foreach (DataColumn column in source0.Table.Columns)
{
int n = column.Ordinal;
ProcessItemHandler handler = handlers[n];
…
_____________________________
...and justice for all
|
|
|
|
|
At some point your handlers collection doesn't have an item at 'n'. Put some exception handling here and log your error in some fashion to allow you to figure out what the problem is.
|
|
|
|
|
Found the problem. The handler-array was static and was initialized in two different ways depending on which page that was launched firs after an iisreset.
Hopefully the problem is solved.
_____________________________
...and justice for all
|
|
|
|
|
Hello friends,
I am displaying my reports in pdf format..This reports are opened in Acrobat Reader 7.0..This is working right on my pc..but on client machine it is giving error..of 'Access Denied'..Is there any setting in IIS to allow pdf file to show or it is the problem of the Acrobat REader?
Help me..guys...Thank you..
|
|
|
|
|
It is most likely a file permission problem. On your development machine you will be running as yourself (if you are running Visual Studio's built in web server). On IIS your web application will be running in a protected/restricted account.
Does the directory that contain the PDFs permit IIS to read its contents? (You can find out which account IIS is using by going to the properties for the website/virtual directory in IIS and selecting the "Directory Security" tab. Then pressing the "Edit..." button in "Anonymous access and authentication control" and seeing what the settings are.
|
|
|
|
|
Hi to all,
I have a problem in updating the datagrid.
The scenerio is: I am having a datagrid on my page.I am basically working on shopping cart.Whenever user selects any the product it should be displayed in the datagrid(ie my cart).Suppose the user continues the shopping and he again selects one of the product.Then it should be added below the first row in the datagrid.
But I am not getting this result.Whenever I add another item in my cart ,it will replace the previous one.
I have tried it as:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Cart"] == null)
{
get_data();
Session["Cart"] = dt;
}
else
{
dt = (DataTable)Session["Cart"];
get_data();
}
}
public void get_data()
{
dt = new DataTable();
dt.Columns.Add("REF", typeof(string));
dt.Columns.Add("Description", typeof(string));
dt.Columns.Add("QTY", typeof(int));
dt.Columns.Add("Price", typeof(float));
dt.Columns.Add("Cost", typeof(float));
pro_id = Request.QueryString["pr_id"];
quanti = Convert.ToInt32(Request.QueryString["quant"]);
SqlConnection con = new SqlConnection("Server=.; Database=eclsc; Trusted_Connection=yes");
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select ICEMACHINES.product_id,ICEMACHINES.sh_desc,ICEMACHINES.price from ICEMACHINES where ICEMACHINES.product_id LIKE @product_id union select GLASSWARE.product_id,GLASSWARE.sh_desc,GLASSWARE.price from GLASSWARE where GLASSWARE.product_id LIKE @product_id ";
cmd.Parameters.Add("@product_id", SqlDbType.NVarChar, 50).Value = pro_id;
cmd.Connection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
ArrayList arRole1 = new ArrayList();
while (rdr.Read())
{
desc = (rdr["sh_desc"]).ToString();
id = (rdr["product_id"]).ToString();
unitprice = Convert.ToSingle((rdr["price"]));
cost = unitprice * quanti;
arRole1.Add(rdr["product_id"]);
arRole1.Add(rdr["sh_desc"]);
}
cmd.Connection.Close();
DataRow myrow = dt.NewRow();
myrow["REF"] = id;
myrow["Description"] = desc;
myrow["QTY"] = quanti;
myrow["Price"] = unitprice;
myrow["Cost"] = cost;
dt.Rows.Add(myrow);
dt.AcceptChanges();
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
}
Please give me some idea where I am lacking.
Thanks in advance!
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: dt = (DataTable)Session["Cart"];
get_data();
I suppose dt is a page level DataTable
You are fetching it from session and assigning to dt
sneha Choudhary wrote: public void get_data()
{
dt = new DataTable();
Then in your function get_data you are reallocating memory
dt = new DataTable();
The above line will clear reallocate memory to datatable and hence destroy all the previous values
At last
sneha Choudhary wrote: if (Session["Cart"] == null)
{
get_data();
Session["Cart"] = dt;
}
You are overwriting session.
Trouble is in line
dt = new DataTable();
|
|
|
|
|
Hi,
I want to display a list of n(might cross 100) number of items on the page in a ListBox.
But just for the convenience of the user, I want each ListBox item with a checkbox. So that the user can easily select multiple items & he doesn't need to keep pressed ctrl key while selecting multiple items. There is a control CheckedListBox,but it is available for Windows forms only,and not in ASP.Net.
How can I achieve my requirement?Kindly give some guidance.
Thank You.
|
|
|
|
|
what exactly you want to do.
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: what exactly you want to do
He want to do CheckBox List like This[^]
|
|
|
|
|
First of all I want know that Why your trying to do this ? If there is more than 100 Chekbox , How many of them user will select ? So first think about your design !!
Now come back to your Solution. If I am not wrong you want some thing This[^](Check Langauge, Platform, Technology.. Section ) .
There are multiple approaches to solve this .
1. You can create them at runtime, placed it inside a Div, which should have scroll option. [ Performance overhead is there ]
2. Simple way to use GridView, use Check box Template Field .
3. Create your own custom control.
|
|
|
|
|
Hey,thanx for your reply. Well,by default all the items(may be 5-100) will be selected. But,just wanted to allow the user to disselect any item,if he wants to. Otherwise there is no compulsion of having such design.
Anyways,thanx for those suggestions .I'll try to get the desired output using them.
|
|
|
|
|
Morning,
I am specifically looking for syntax highlighting in an ASP.NET environment.
All components I can find are built for C# or windows forms. I would like to create a web editor for my aspx, cs, html and css files.
Is this possible? I assume a lot of Javascript will be involved. Any answers out there?
Thanks
|
|
|
|
|
Hi guys,
I'm new to crystal reports and am using Visual Studio 2008 now. When I run my website on visual studio it can display my Crystal Report. But when I deploy it by publishing it to my local IIS, the page comes out. But then the report doesn't load. It's done with errors in page. How do I solve this problem? Thanks in advance! ^^ Cheers~
Regards,
SaberBladeZ
|
|
|
|
|
|
Hi, Thanks for the reply =)
I have found out the problem thanks for the help though =) Now I have got another problem, aligning the report. I created a Table to align it with my side navigations. My table is a 2Column and 2Row. And I place my navigation at the 1:1(Col:Row) and my Report Viewer at (2:2) It seems to not help as the navigation doesn't stay at the top. Instead, it is being moved down when I run the website. Is there any way I can align my navigation so that it does not move? and stay at the spot I put it(Fixed Location) Thanks in Advance! Cheers ^^
|
|
|
|
|
I am creating a bulk emailng system.
I got all the records in datatable with a identity(seq generated from 1 - no. of rows) column.
Now I filter 100 rows from datatable every time to new datatable and get email process done on it.
than i remove those 100 rows from tha main datatable and get next 100 and process till end.
but this piles up the memory after some time and system hangs.
I use gc.collect to remove unused objects from memory but i think thats not a good solution.
so the question is how to dispose memory occupied byu datatable after working on it.
|
|
|
|
|
Member 2363916 wrote:
I use gc.collect to remove unused objects from memory but i think thats not a good solution.
Yes !! This is not a good practice to call GC Explicitly .
Member 2363916 wrote: so the question is how to dispose memory occupied byu datatable after working on it.
Can please just put the line of code for storing and retrieving data from data table.
|
|
|
|