I am unble to read csv file when I use URl of the Website. But, it runs fine when I run using VS2010. I know it is permission issue: as I am new to server side I need some help. All other Webpages that don't deal with CSV file are running fine. I am using IIS7. Till now I have played with DCOM, WMI and have given access to everyone. There is no error Website is not able to open the file and read it.
Please let me know if you need additional info.
Make sure IUSR has read permissions for the directory that contains the csv file.
This is how it works: Click on the site name. Double click Authentication. Select ASPNET Impersonation.Click Select the user and enter your credentials similarly select the sever and follow above instruction for ASP.NET Impersonation. And it will work!!
Related
I've a .Net/C# Windows application which can create text/pdf files. My requirement is to make these files accessible via http links for another internal application inside my organization. The internal application only accepts http links (ftp and others are not supported).
I know this can be done manually by placing these files in an IIS server. I would like to know whether there is any easy way to do this programmatically? Once the file is created locally in my application, I should have a http link to access the file.
I'm not sure if I understand your need correctly. You can point it out when anything wrong.
Assuming that the application create pdf files in a folder named PDFile. On IIS, you can add a site and set it physical path to PDFile folder. If you enable Directory Browsing, you can see all files when enter the url of this site in browser like this:
When you want to access these file from an external machine, just enter the url http://serverIP:port/PDF file name for example http://xxx.xxx.xxx.xxx:80/mycustomefile.pdf. No need to set anything programmatically.
I have my files stored in Azure File System and here are the requirements -
User should be able to view the documents without downloading it to the local
This is working fine for pdf but not any other mime types
I tried setting Content-Type,Content-Disposition (in azure file properties but no luck) and also iframe.
User should be able to edit the doc online without downloading.
I don't think this is possible just with Azure and have to integrate with One Drive may be? Correct me if I am wrong?
I would really appreciate any inputs/thoughts.
Not sure if this is a viable option but using Storage Accounts in Azure, you can map these accounts as a network drives to any client machine. So they would be able to access these files via File Explorer.
This link covers the basic steps in setting it up.
Unfortunately for anyone who wishes to use this feature, they need to be on Windows 8 (or above) to be able to map a network drive successfully as it uses SMB3.
If this option is a no go I will delete the post.
I am publishing Windows form application using ClockOnce in ASP.net web application. I understood that when user click on publish button then the clickonce application will be downloaded. this option is unsecure as anyone who know the download URL can download. to add Authentication I am using httphandler as per David P Henry suggestion from codeproject everything is working fine. I would like to add more security to this approach instead of placing the clickOnce app file in Application Files folder in web app I would like to place these files in SQL Server. So my application should able to download these file from SQL Server and send it to user.
Is it possible in Clockonce?
If possible I would like to know the approach.
Yes it is possible. Use a VirtualPathProvider to read the files from SQL instead of the file system.
As ClickOnce requests the files via http/https it is possible to intercept each request and pass your own version (in this case read from SQL instead of the server's file system).
Linked below is a simple project that shows how to utilise a custom VirtualPathProvider.
http://www.codeproject.com/Articles/16848/Creating-Custom-Virtual-Path-Provider-in-ASP-Net-2
I would suggest converting the directory where the files should be stored to an application and adding the Global.asax to the root of the application.
Then add a handler mappings for *.deploy and *.manifest for the root directory so your VirtualPathProvider will run when each file is requested.
Within the overridden FileExists method (in your VirtualPathProvider) write some logic to return if the file exists or not. You could put some authorisation here but I don't know if ClickOnce caches Http responses, as the server would return a 404 if this function returns false.
Within the Stream Open() in your VirtualFile return a MemoryStream read from your SQL server.
Hope this helps.
I need to Copy the files from desktop and Paste it in Web application created by asp.net with c#.
If the user copy any files from esktop, and paste the file in my webapplication output(i,e i run the application, the user enter using their login and paste some files.
then my application get the file and save it.
so, how can i get the file while user paste?
This is urgent.
Thanks and regards,
Pooja
So I assume you allow user to access your application folder via network sharing, then you met need to monitor that folder so after new file added you can get them, please check this: http://www.techrepublic.com/article/use-the-net-filesystemwatcher-object-to-monitor-directory-changes-in-c/6165137
and hope it helps.
But why not you implement some upload function?
I have develop a small web application in asp.net (c#) for uploading files into data base it is working fine in my local machine .But when i tested in the server it showing error like
C:\inetpub\vhosts\crosstouch.com\httpdocs\Images\100898.jpeg' is denied
what can i do to resolve this problem please help me....
By default the you wont have write access to this directory. See this note for IIS6 or search MSDN for whatever version you're using.
http://support.microsoft.com/kb/816117
Give write permission to IISUSER in
C:\inetpub\vhosts\crosstouch.com\httpdocs\Images folder
give a permission to Images folder..
i think you are using Plesk Panel for Handle it....
use Hosting Control Panel and Give permission...