I have a file share on a machine. On another machine I have IIS and a webapp running. Through the webapp, I want to be able to offer files from the share for download. On the IIS machine, how can I persistently map the fileshare drive to say drive Z:?
If I map the drive with a regular user, the mapping disappears when the user session ends, right? Is it possible to map the drive persistently so that IIS can access the files on it regardless of whether someone is logged in or not?
You can't use mapped drives like Z:. Use UNC paths (\\someserver\someshare\) to access content on the network, instead. You have to create a Virtual Directory in your web which points to the UNC path. You will also be asked some questions whether you want to use a static username or not and what access permissions you want to allow.
Related
Senario, Google Shared drive full of documents, shared with the IIS server, server has a virtual directory pointed to a folder that is available locally on the IIS server.
Using Dropbox, I can set Security options on the folder and the IIS server has access to the folder, works great. Company wants to move to Google Drive, when I attempt this, the Google drive folder has not Security Tab option.
I have scoured around for answers but everything is about the API, this has nothing to do with the API.
I also created an account on the IIS server, gave the account Administration privilege's and I get this error: "Specified user cannot access path (d:\Shared\GoogleDrive).
Also, I setup d:\Shared because I can apply Security settings to the folder and was hoping it would propagate down but it does not.
I finally figured out how to do this:
On the server itself backup/sync the folder desired. This allows you to manage the security on the folder, which is lost with other approaches.
From the google drive web interface, select computers, select the desired folder and using the more options from the menu, "Add shortcut to Drive".
You can then share it across the companies established share structure as a shortcut and sync files easily to the webserver.
In my case these are forms and pdf files but the webserver needs security access to the folder and using the base line Google shares did not work for me. This way did.
I want to give read-write access to a specific folder in Azure VM to someone from his/her machine at home. I do not want him to give access to login to the machine, but some way so he/she can reach the directory and make changes. Any ideas?
I do not want him to give access to login to the machine, but some way
so he/she can reach the directory and make changes. Any ideas?
According to your description, maybe we can deploy FTP on that VM. In this way, he/she can access this folder on internet, we can give them read-write permission.
Here a similar case about how to deploy FTP on windows server, please refer to it.
I'm trying to simply run a local website which has sime basic HTML files using IIS.
Through the IIS Manager I have created a new website and have set the physical path to the directory with the HTML files.
However when I input the physical path I get the following warning:
The server is configured to use pass-through authentication with a
built-in account to access the specified physical path. However, IIS
Manager cannot verify whether the built-in account has access. Make
sure that the application pool identity has Read access to the
physical path. If this server is joined to a domain, and the
application pool identity is NetworkService or LocalSystem, verify
that \$ has Read access to the physical path.
Then test these settings again.
Now, when I navigate to the site through localhost I get the following Unauthorized error:
You do not have permission to view this directory or page because of
the access control list (ACL) configuration or encryption settings for
this resource on the Web server.
What's going on here? When I right click my folder I seem to have given access to everyone. I haven't made any specific IIS changes so what could be the issue here?
EDIT:
MAN I cannot believe this. My case is so simple (I just wanna display some HTML files on localhost) which should require ZERO configuration at all. Yet IIS fails to meet the demand.
EDIT: I think everyone should have permission to my folder. Here's a picture of the permissions screen for the folder:
Working with a set of server protocols is different than adding files to a share. In this case, you're going to want to open IIS and navigate to the website you added it as.
There, you'll see a variety of icons, some under the heading of ASP.NET, some under IIS. The first heading you'll see under IIS is Authentication. That's the one you want. If this is strictly internal/for learning, go ahead and enable Anonymous Authentication. It's not safe, but it'll get you in the right place to start googling around.
Everything I've found via search on this talks about Read/Write for local drives only (typically C) and what I am having trouble with is getting the same Read/Write access for an application pool to a non-local drive, specifically a share on the file server.
We've set the Application pool to run the anonymous user under a domain account that we have explicitly verified has full control of the file share and yet the web app that use the application pool is unable to access this non-local share. It can however access a local copy of the shared folder if we copy the folder from the file server to the local drive.
This is a third party app and we'eve followed all the instructions from the vendor and so far this is unresolved. Their support is looking at this but I don't believe they have any idea on what's wrong. This same web app works fine with the same file server share when the web app is running under IIS6 on another sever so its something with IIS7.5. I figure its got to be something particular to IIS7.5 that is not in IIS6 that is the key.
Ideas?
FYI - The application pool is already set to classic mode.
I think that you will have to see the permission that you have. In iss7.5 you have the aplication pool running with an account, It can be a ApplicationpoolIdnetity, or a real one. if you want to access the share the application pool identity has to have rights to do so, or you can impersonate a user and then use the permission that user has to copy to the shared folder, i prefere to use the impersonate, only when is necessary i do the impersonate and do whatever i most do.
I am using C#/ASP.NET, IIS6 on Windows Server 2003.
Map the data server shared folder to the WebServer with driver letter V:\
On the WebServer, IIS created a virtual directory and pointed to 'local location' with V:\ . Since there is no 'Connect As', not sure which USER will be used
In my WebMethod, I want to create file on the shared folder with FileStream.Write().
I got IO Exception on the action, any hint?
P.S. I have added ASPNET/NETWORK SERVICE on the data server shared folder.
thanks!
Gavin
Mapped network drives are specific to the user account that created them:
Using Mapped Drives with IIS - MS KB257174
The preferred method of accessing content for the Web server that exists on a remote computer is to use shares that follow the universal naming convention (UNC).
It's very likely that NETWORK SERVICE (or if you're running ASP.NET under impersonation, the site anonymous account) hasn't got this mapping.
To change the location where the virtual directory points to, browse to your site in IIS manager, right click on the virtual directory and select properties. You can then select "A share located on another computer":
The website in IIS has a corresponding app pool and this should tell you the user under which your code wil be running.
You'll the have to grant the appropriate permissions for that share for that user.