Solved

How to Add an ASP.NET 4.0 website to IIS7 in SBS 2008

Posted on 2014-01-14
16
824 Views
Last Modified: 2014-01-14
Hi,
I am new to ASP.NET having been used to ASP. I have created a web application that runs fine in Visual Studio 2013.  I want to run it on a Small Business Server as a website.

I created a new Site in IIS7 and as part of that process pointed the site to the folder on the server that holds the web application files.  I initially copied those to that folder using VS2013.

Once the Site was Created I can now see the site listed in IIS under its name "AIPWeb" and if I open the application pools collection I have an application pool called AIPWeb and it contains 1 application  "Root Application" that has the physical path that points to the folder on the server holding my files and site "AIPWeb" and it is application pool AIPWeb (V4.0).

I have set my default page to "default.aspx" which is the starting page in my site. I also set the bindings to type "http" Host Name "AIP" Port "80" IP Address "*" and I thought I was good to try out my site.

If I then Select the site "AIPWeb" and in the Actions pane click "Browse AIP" on *:80 (http) IE opens up with the address http://aip/ and I just get the message "Internet Explorer cannot display the webpage" ??

Can anyone point me to what I have missed as it's driving me barmy!

Siv
0
Comment
Question by:Siv
  • 10
  • 6
16 Comments
 

Author Comment

by:Siv
Comment Utility
I just tried accessing the site via the internet using the browser on my own machine which is external to the network where the application is running and I get a 404 error:


The resource cannot be found.
  Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

 Requested URL: /AIPWeb/Default.aspx

It feels like I am not quoting the correct address and IIS cannot find the page I am looking for?

Siv
0
 
LVL 19

Expert Comment

by:Patricksr1972
Comment Utility
Could it be a web.config error?

Open this file and right under

<system.web>

enter the next line:

<customErrors mode="Off"/>

What does a reload of the site tell you?
0
 
LVL 19

Expert Comment

by:Patricksr1972
Comment Utility
How does your machine know where the website 'AIPWeb' lives?  (instead of e.g. www.AIPWEB.com which domain you must own off course)

Did you add an hosts entry?
0
 

Author Comment

by:Siv
Comment Utility
Patrick,
I get this:

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Siv
0
 
LVL 19

Expert Comment

by:Patricksr1972
Comment Utility
Hi Siv,

I know... so you open a browser and type in   http://AIPWeb/default.aspx

HOW is your machine to know where that site lives on the internet?
0
 

Author Comment

by:Siv
Comment Utility
I actually use:

http://remote.advantage1.co.uk/AIPWeb/

or

http://remote.advantage1.co.uk/AIPWeb/Default.aspx

Either way I still get the same error?

It's almost as though something is not enabling the website but when I check everything it says it's running??

Siv
0
 
LVL 19

Accepted Solution

by:
Patricksr1972 earned 500 total points
Comment Utility
Ok clear,

This way you have to make sure the AIPWeb is not a standalone website but a application within the website where http://remote.advantage1.co.uk/ lives. (guessing it is the default website)

So rightclick this website in IIS and select add application.

Name it AIPWEB and point it to the right application pool and physical location on the harddisk.

Then, try again.
0
 

Author Comment

by:Siv
Comment Utility
The only issue I have with that is that all the stuff on the default website is ASP.NET 2.0 and my application is 4.0.

I might be able to make it 2.0 as I am not sure I have used anything 4.0 specific, but I'd rather not if possible.  The other alternative would be to make all the stuff in the default website 4.0 but I don't know if that would break Small Business Server??

Siv
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 19

Expert Comment

by:Patricksr1972
Comment Utility
Hi

I understand this concern. But there are options.

Obviously you own advantage1.co.uk
Now what if you create a new A record in its DNS at your provider and name it AIPWEB which points to your webserver public ip (starting with 213.123)

That way you could rename the standalone website AIPWeb to aipweb.advantage1.co.uk
Also in IIS in basic settings add host name aipweb.advantage1.co.uk to port 80.

Once DNS is replicated you can use this address.
0
 

Author Comment

by:Siv
Comment Utility
Patrick,
I can see what you're getting at, but why can't I just tag AIPWeb as sub-directory for example if I look at OWA (Outlook Web Access) it has the URL  (as viewed from the server itself) as:

https://sites/owa

How is that concocted to point to the "SBS Web Applications" site and it works?  What bit of plumbing in IIS or DNS is pointing the Site "SBS Web Applications" effectively to http://site or https://site and then each application within that gets a subfolder?

Surely if MS have done that I ought to be able to do that with mine so that I can have:

http://AIPWeb/AIP or something or if coming in from remote

http://remote.advantage1.co.uk/AIPWeb/

I am confused?

Siv
0
 

Author Comment

by:Siv
Comment Utility
Patrick,

I just tried compiling the asp.net to version 2.0 and a shitstorm of errors started to appear, so it does look like I am going to have to try the DNS method and create an A Record that points to a different name than remote.advantage1.co.uk and allows me to bind my own site to it rather than piggybacking on one of the existing sites!

If you can think of anything else that would be great.

Although I provide development and IT Support for the company it's the company who does their website that has control of the DNS records so I'll have to contact them and get them to add the A record.

Siv
0
 
LVL 19

Expert Comment

by:Patricksr1972
Comment Utility
Hi Siv,

A little correction, OWA is a subsite for the default website which by default is running under .NET2 as all subsites underneath it.

You can tag AIPWeb as a subdirectory but not under the main page that is configured to use .NET2 (even i have seen many instances of default website thus RWW/OWA run under .NET4, it is a matter of trying) If it keeps working your home free, if something failes you must look for alternatives like i described.

Whats against putting the default application pool to .NET 4 and test?
0
 

Author Comment

by:Siv
Comment Utility
Patrick,

I am frightened, as SBS has so much of its internals hard wired that although in theory you should be able to upgrade the sites to DNF 4, I just have this horrible feeling that it will break something else on the server and cause loads of trouble for users. If I thought I could back it out to 2.0 again quickly I'd probably do it!

If you are confident that changing the default apps to 4.0 can be easily undone I might give it a go?

Siv
0
 

Author Comment

by:Siv
Comment Utility
I just tried changing it to 4.0 and now I am getting internal server error 500 with OWA and Remote desktop, so I have changed it back to DNF 2.0 and rebooted server let's hope it all works on starting back up??

Yikes!
0
 

Author Comment

by:Siv
Comment Utility
Patrick,

Panic off, I discovered it was I had changed the "allow 32 bit applications" in the default app pool settings that was causing that.  I have now got it working by setting the SBS Web apps to DNF 4 and (touching wood) it all seems to still be working (I tested OWA and RWW and they are both OK!)

My app now runs and I am getting al the usual errors from SQL Server etc but at least it's moving forward now.

Thanks again for your help.
0
 

Author Closing Comment

by:Siv
Comment Utility
In the end adding my site to one of the existing App Pools worked.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now