• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 920
  • Last Modified:

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

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
Siv
Asked:
Siv
  • 10
  • 6
1 Solution
 
SivAuthor Commented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
SivAuthor Commented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
 
SivAuthor Commented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
 
SivAuthor Commented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
 
SivAuthor Commented:
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
 
SivAuthor Commented:
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
 
Patrick BogersDatacenter platform engineer LindowsCommented:
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
 
SivAuthor Commented:
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
 
SivAuthor Commented:
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
 
SivAuthor Commented:
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
 
SivAuthor Commented:
In the end adding my site to one of the existing App Pools worked.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 10
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now