ASP.NET Web application cannot identify UNC folder - asp.net

Having a bit of trouble after migrated my app to IIS 7. Everything was working perfectly when it runs under IIS6.
The main problem is I have a UNC mapped folder (Folder A) under the root folder of the my web application. This folder is located in same network but in different server.
So when I try to access this from my ASP.NET site, instead of reading the contents from the remote UNC path, my application looking for FolderA in Web Server which it clearly fails.
The application runs as a custom user which has pretty much all permissions it needs
I'm running out of ideas here and can anyone shed some lights please?

Related

IIS7 Virtual Directory gives 403 Forbidden Access Denied

I have some issues with IIS7 setup that I hope someone can help me with.
I am developing an ASP.NET MVC5 application which consist of 1 web application and 1 web api application for handling REST calls. They are on the same solution in Visual Studio. While developing, they run on the localhost with two different ports as usual.
Now that I am deploying to a web server, I planned to have them running like this:
Web app: http://mydomain.com
Web api: http://mydomain.com/api
So I created a site on IIS for the web app and virtual directory under that site with an alias of "api".
The web application runs without issue and I can put a static test HTML file under api folder and it runs fine. But when I put all my published file in api folder, I got 403 Forbidden Access Denied.
My questions: can I run an ASP.NET application on a Virtual Folder? If so, what I might have done wrong? The folder permissions are the same between ./mydomain.com and ./mydomain.com/api folders.

Questions about copy IIS config files to another server

I have several asp.net web services is running in IIS. Now I want to move to another server in all exactly same IIS setting and using same web services. I know about copying a IIS config files(ApplicationHost & administration) to new server remotely but do I also need to copy all asp.net files to new server as well? If yes then must the asp.net files be in the same file path directory as the current one(D:\Website) for IIS in new server to be able to recognize it?
Yes, you would need to copy the ASP.NET files as well.
It is not necessary to put them in the same file path directory. Whatever directory you put them in, ensure your IIS Website Settings point to that directory and you have setup the same set of permissions etc. on it.
e.g. You could have had a website on c:\site on one web server. you could move the website files onto another web server and put them on d:\newsite\ and change the Website Directory Path in IIS Manager to point to D:\newsite\ directory.

My Website displaying big IIS7 screen when access

We have taken a domain for our asp.net application. That application is deployed in our server (IIS7).. when we are trying to access that website its showing one big IIS7 screen..
can you pls let me know the issue.
Regards,
Abhi
Is your application definitely deployed at the root of the website in IIS or is it deployed as a virtual directory?
Because this is the behaviour I would expect if it is deployed as a virtual directory.

ASP.NET permissions issues

Im using Windows Server 2008, IIS7, .NET 4 and when I use the FileUpload control to save a file to a directory I get :
Access to the path 'C:\xxx\Websites\CMS\Admin\test' is denied.
I have given the test folder full control permissions for NETWORK SERVICE but it makes no difference.
I have given full control to the Everyone user but makes no difference.
It might have something to do with the fact that up in the CMS folder there is a MVC web application and in the CMS\Admin folder there is a web forms web application. It is the web forms web application that is trying to upload the file and getting the permissions error.
Can anyone offer a suggestion.
Are you running your application in Medium Trust? Medium Trust does not allow file IO outside of it's own virtual path hierarchy.
Check the web.config for a <trust level="Medium" ... element.
Check the Application Pool that your site is running under and make sure that it is running as NetworkService instead of PoolIdentity.

ASP.NET app access to UNC shared DB file works as IIS virtual directory but not as an IIS website

This one is killing me. I have an ASP.net (2.0 Framework) app that uses integrated security. IIS is setup appropriately and works fine as a virtual directory off the default website. My OLEDB connection (Jet 4.0) works fine and connects to a database file via network share (\GIS1\GIS Server - PublicWorks_StreetSigns).
BUT, when I create an IIS "website" and point it to the exact same home directory I get an error...
Error getting data from DBF. '\GIS1\GIS Server - PublicWorks_StreetSigns' is not a valid path.
Do I have to do something different in a website versus a virtual off the default website to make this work? I've triple checked the virtual settings against the website settings and everything is the same.
Thanks in advance.
I would check the identity of the application pool servicing each website. My guess is that the default identity of the app pool doesn't have permissions to that path.

Resources