|
1. When a download is pushed from the server the file complete path is never exposed. It is from the page that is being opened, but a threat level is always there.
2. He has not defined that the PDF will be generated by System or manually. If manual, then it can be password protected, before being uploaded to server.
3. How much time it takes to send a mail. Hardly a minute or two or five. For security it does not matter. Regarding spam, the address can be added in Contact List. Last, if the User is traveling, and can access the website, but not mail, how is this possible(IF there are firewalls, or proxy's).
There is also a fourth option in .net,i.e., if you have used the rapidshare.com, it does not start the download even if you typed the complete path of file in address bar. I can implement that in .net, but have no idea of php.
Securing a file little is always better than leaving it in open. Atleast the person who is interested, will have to do the extra workout.
|
|
|
|
|
Email is not a practical solution for a number of reasons.
Amandeep Singh Bhullar wrote: How much time it takes to send a mail. Hardly a minute or two or five.
That's the point, time. A user wants to view the file immediately, that's why they clicked on the link. Email may not be available, think of a kiosk situation.
Amandeep Singh Bhullar wrote: Regarding spam, the address can be added in Contact List.
So you're saying that to look at the file I must know the email address of the sender and add it to the white list before I can receive the email and view the file I wanted.
Amandeep Singh Bhullar wrote: Last, if the User is traveling, and can access the website, but not mail, how is this possible
how is this possible? You can't be serious. Apply a little thought processing.
only two letters away from being an asset
|
|
|
|
|
Email is not the perfect solution, i agree with you. I just suggested him the one way.
|
|
|
|
|
Store the files outside the site document root (write-protected).
Your code should check for logged in user.
You may code a script for fetching the contents of the downloadable file and also storing it in a file on the fly and render it. This Should solve the purpose.
Girish Nbr.
|
|
|
|
|
Do not store the files in the directory instead store them in the database.
Have a look [^]
-----
|
|
|
|
|
Hello Everyone
I am using a drop down list in asp.net 2.0
What i want to do is, user will not select the states but user can select the cities in that, means, according to that country, cities will be listed in same drop down list.
Regards
Saurabh agarwal
|
|
|
|
|
I believe , you are using database for that. so in a Dropdown list just read all the States name , when user select state name from dropdown, just create simple query which will retrieve the city name based on states and bind them in a dropdown list.
cheers,
Abhijit
|
|
|
|
|
following Exception occurs on using grid.rendercontrol(hw)
Control of type 'DataGridLinkButton' must be placed inside a form tag with runat=server.
i am working on a web application built in asp.net and vb.net framework 1.1
i need to export a grid to excel using a button click.code for button click is given below
the code snippet works fine for one web page but causes exception on the other.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
HtmlTextWriter(stringWrite)
Grid.RenderControl(hw)-- exception caused here
Response.Write(tw.ToString())
Response.End()
End Sub
Not able to find where is the problem....Please help
|
|
|
|
|
Try using the below code to export the Grid to XLS, its working fine for Now.
Response.Clear()
Dim abc As String = "attachment;filename=Outbound.xls"
Response.AddHeader("content-disposition", abc)
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.xls"
Dim stringWrite As New System.IO.StringWriter()
Dim htmlWrite As New HtmlTextWriter(stringWrite)
Dim frm As New HtmlForm()
Controls.Add(frm)
frm.Controls.Add(GridView1)
frm.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()
|
|
|
|
|
this gives the following exception at the line
Controls.Add(frm):
The Controls collection cannot be modified because the control contains code blocks
|
|
|
|
|
i have used the original code in two different pages to export grid to excel.
its working fine in one where the grid is not inherited control where as in the other its inherited and not working
|
|
|
|
|
the issue is always there when you try it with the inherited grid
|
|
|
|
|
So is there any solution to it
|
|
|
|
|
|
Hi, I have a webpage and when I load it, i feel that it is load very slow. So does anyone know about the tool or software that I could use to test the speed of my webpage? Thank in advance
|
|
|
|
|
Mekong River wrote: tool
A Chronometer?
Just kidding.
Here you are.[^]
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
hmmm... yes, tool hear refer to a software that could measure the speed of my webpage.
|
|
|
|
|
You can use Fiddler[^] to check whats being transmitted up and down the wire so you can optimize your app
only two letters away from being an asset
|
|
|
|
|
|
Hi,
I can't get my unit test to work. Here is the error I'm getting (I'm using NUnit)
System.Net.WebException: The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fWebServices%2fMyService.asmx%3fAspxAutoDetectCookieSupport%3d1">here</a>.</h2>
</body></html>
--.
What could be wrong? Here is an idea of how my current environment:
- I created a web application in the localhost IIS (a virtual directory)
- under this web app, there is a \WebServices folder containing MyWebService.asmx
- In a different solution (also a different directory), I created a Class Library project with a Web Reference to MyWebService.asmx
- I tried testing a simple Hello World method (code below) and I'm getting the above error.
In MyWebService.asmx
[WebMethod]
public string HelloWorld() { return "Hello World!"; }
In MyWebServiceTest.cs
[Test]
public void HelloWorldTest() {
var svc = new MyWebService();
var str = svc.HelloWorld();
Assert.That(str, Is.EqualTo("Hello World!"));
}
Thanks in advance for your help.
Rafferty
|
|
|
|
|
When you are testing the application , Your Web services is running ?
cheers,
Abhijit
|
|
|
|
|
Thanks for replying.
Yes my web services are running... I just found out that it's not really a unit test issue but a general web-referencing issue. What I mean is, if I open the web service through my internet browser and invoke the methods, the methods will execute. However, if I create a simple .net project and add a web reference, I get the error stated above.
Any idea why?
Thanks.
Rafferty
|
|
|
|
|
Hi all,
I’ll go straight to the point.
I have Crystal report XI and have created a report, which works fine. However, on the page there is a user id and only that user can see the report according to their user id. In the report I have created a Parameter Fields so the user can select their user id and view the report accordingly. That is only available when you run the crystal application. What I want to so is when a user clicks the view report option, the JavaScript runs on the client side and opens the “.rpt” file. While plugging in the user id so the users don’t have to AND view the file in crystal report viewer. Is this possible? Would appreciate any help on how I can achieve this.
And Thanks
|
|
|
|
|
This website is running a crystal report and displaying the results. It works fine on my local machine. When I publish the site and deploy to the server I get the following message:
"Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."
What needs to be done to prevent this error?
|
|
|
|
|
Civic06 wrote: What needs to be done to prevent this error?
Duh, have the assembly available. Have you installed Crystal on the webserver? Are the assemblies available in the bin folder?
only two letters away from being an asset
|
|
|
|