Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Deployment under IIS7/VS2010 as Web Application

I transformed my VS2008 ASP.NET Website to a "Web Application" today using VS2010. So now it's possible to build a Deployment Package. A Zip Package which can be direclty imported into IIS7.

Usually I added a website in IIS7 called mydomain.com and put everything in its root dir. That worked.

However, since I converted to an Web Application, this Application is added beneath my "Website container". Now I'm confused, this is how it actually looks now when I try to open the website:

Browsing to mydomain.com says 404 ERROR.

Browsing to mydomain.com/mydomain.com opens the actual website, but in a subfolder instead of the root directory. (The Application is named after the Domain)

How to make this application the root of the website now? I want the application to run under the mydomain.com ROOT and not some subfolder.

Thanks a lot!

like image 391
adchased Avatar asked Oct 14 '22 07:10

adchased


1 Answers

In VS 2010, right click your project and go to Package/Publish settings.. In there, down below, in the Web Deployment Package settings, there's a IIS Web site/application name field.

It seems that it's currently set to mydomain.com/mydomain.com or something similar. Change it to mydomain.com and it should work as expected.

Second thing to check is your Publish settings (VS menu Build -> Publish "websitename"). Check the Site/application field. Set it to mydomain.com as well, make sure it doesn't have any slashes.

like image 153
Artiom Chilaru Avatar answered Oct 20 '22 15:10

Artiom Chilaru