In my application, first, i have not connected to iis server, and trying to access secondary path at this time it is accessing that path. but when it is connected to IIS server, it is giving unathourizedaccess exception.
I have a few computers (with Vista Business OS) connected in a private network. A C#.NET application running on one computer is currently able to access the network shared folders without problems. However, I am trying to get an ASP.NET application on that computer to access the same folders but I am getting "Access denied" errors. I added NETWORK SERVICE to all the shared folders' security (with full control) but it still gives the same errors.
i developed an asp.net(2.0) applicaions which contains the attachments of the clients . these attachments are saved in the shared folder and retrive the file when the user requests.if i maintain the application and the shared folders in the same system it will work properly.if i maintain the application in one server and the file folder in the other server i face a lot of security issus like1.Access Denied2.Couldnot find the part of the path......for this i made an common account for the application server and the file server and also set impersonation to true.Even the i got the couldnot find the part of the path error.i already gave the everyone with full control to the shared folder and i added the common account and gave it to full controlIs there is any alternate for the save and retrive the files to and from the shared folder.
I setup the project on the network instead of localhost? I want to setup a Remote Site, I think is the lingo Go into visual studio File, open website and put the website name in the box and a password to open the source.Create a unique url name like myWebApp.mycompany.com
When I create a new website application in visual studio. When I am ready to debug Visual Studio sets all this up for me and it runs on local host automatically.I guess in my scenario I gotta set it up manually. How do I accomplish this?I created a new virtual directory, went through the permissions wizard and keep getting this error:
We have an aspx page that displays list of html file & folders from an shared folder. The html files and folder within this shared folder is being maitained by the end users. These are the static html files. When user clicks on any of the file, our .net code open up that file in the new window.
Recently there was an change in the requirement. End user wanted to display some of the data dynamically in the HTML page. We the asked end users to replace the static/hard coded data(eg. City name) within the html files. Find below sample code for your reference
Existing code in html
New code in html
To achieve this our .net code looks for the tag values(State or City) within the lookup table in SQL DB. It then gets the value from the respective tag from DB and replaces the custom tag with the DB value
Eg: <TAG:DYNAMIC value="State"> is being replaced by the value of the State tag in DB.
In order to achieve this we parse the entire html file and then replace the dynamic tags with the DB value. The parsing happens quick in smaller html files but takes almost 10-12 secs to parse bigger files (around 255KBs). We also noticed that even though we increase the number of our custom tags within the bigger files, the code takes same time to open the parsed html file. So it looks like DB hit is not an issue and looks like the issue lies in the parsing of the files. Find below code that parses the html file
On further analysis we noticed the while loop within the above code takes longer to execute. Let me know if there is any better and faster way to parse bigger html files.
How to access to the folder drive by using VB.NET or C# in the code-behind (securely: with username and password) for the users to be able to view images on the popup window?
See the code :
Protected Sub BtnServerDrive_Click(sender As Object, e As EventArgs) Handles BtnServerDrive.Click Dim PartNumber As String = txtPartNumber.Text.Trim() 'Calculate the folder 4540 like container Dim NumContainer as string = txtPartNumber.Text.Trim() NumContainer = (txtPartNumber.Text.Trim / 1000 + 1).toString.Split(".").First
How to achieve this results to access to the server drive to get images for view by using VB.NET or C# in code-behind. Servermappath, UNC, or else?
var folders=["ad_folder","ad_code","ad_prep","ad_bin"]; var ad_folder=["folderA","folderB","folderC","anotherFolder","etcfolder"]; var ad_code=["folderA","folderB"]; var ad_prep=["folderA","etcfolder"]; var ad_bin=["etcfolder"];
note that I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.
I am stumped. i want my asp.net website to access a network share folder which is located at say, //hero/superman. I can do it manually.
I've done the following:
1. Included <identity impersonate="true" userName="IUSR_TEST" password="test" /> in my web.config.
2. Set anonymous access in IIS 5.1 with username IUSR_TEST and password: test in the account that is used for anonymous access. Checked integrated windows authentication.
3. Created a profile for IUSR_TEST in computer/management/local users and created the password: test for it. It is a member of guest.
4. Created a user account IUSR_TEST for the network share computer. gave it the same username and password.
4. On the network share computer, I've enabled access for the following people: ASPNET, NETWORK SERVICE, and IUSR_TEST.. all with full potential (for now) for the directory path in question //hero/superman which is really located on: c:herosuperman. I've given it full access.
But when I StreamReader fs = File.OpenText(Server.MapPath(@"\herosuperman est.txt"); I get the error "UnauthorizedAccess Exception". Access to the path \herosuperman est.txt is denied.
So what did I miss, what am I doing wrong. The key thing here are:
the webserver is on a domain. the network share computer is NOT on a domain, it is on it's own workgroup. This workgroup, lets just say is called "villains". So if I have to manually map the network drive to access the files, I must type: /villains/IUSR_Test and password: test to be able to map it on my webserver local computer.
my projects image files hosts on a local server machine which name is A.
another server hosts my web projects on IIS which name is B.
I want to set my web projects's image file names like image1.ImageURL = "A\foldername\image.png";
but when the projects runs the image file url gets the image url adrress : [URl] I must access the image files which are another server machine on my local network area and I must get the ImageUrl properties from another server machine
Often, out of sheer desperation I will end up enabling "Everyone" access on a folder that a web app is accessing (perhaps for file creation, reading, etc) because I can't figure which user account to enable access on.
Obviously, this is a very bad thing to do. Is there a way to determine what account IIS is using at that exact moment to access folders (and perhaps other resources like SQL Server, etc)?
Are there logs I can look at that will tell me? Or perhaps some other way? I usually use Windows Auth without impersonation. Not sure if that information is relevant.
I'm using user membership and roles. Below is my web.config for subfolder restriction.
The way I have above, no one can access this folder, mySub, except Administrators, Editors, and Members. However, here's what I want. I want to allow all and any user to the default.aspx page of this mySub folder and denied any other pages if they're not Administrators, Editors, and Members. One last thing, also denied access to addWord.aspx if they're not Administrators and Editors. I know I can list all the pages and give them various permission but I do not want to list all the pages. What's the best and easist way to accomplish this?
I am trying to access a shared folder which is located on a different server rather than on the asp.net server.
I configured windows authentication and set impersonation to true. Also try with enable/disable basic authentication.
I have tried the following:
with a mapped driveshared folder access (\sharedfolder)virtual directory pointing to shared folder with pass through configuration. However none of the above works. I am getting "Access Denied" error when trying with shared folder and virtual directory. In the case of mapped drive getting "Not Found" error.
So is there a way for asp.net, php, or any other server-side script to request the data in a flash shared object?
I am using windows authentication in website. All LAN users have access to one shared drive. I want to retrieve those files progrmatically. Like reading a file from network drive. If I open the solution and click F5, I am able to access it. Once it is hosted in IIS, its throwing error.
I wrote WCF service and i by creating new Web Sites - i added new WCF service that will host my WCF service.
In the 'Web location' i define the service to be HTTP and the URL to be "http://localhost/MyService"
Now i want to access thru some other machine ( in the same network ) to my machine and get using the Service method that my WCF service exposed - but i fail each time ( calling from the second machine "http://a.b.c.d/MyService/interfaceMethodName")
If i try to call the web service thru the same machine - i get the right response.