I have windows server 2008 R2 and IIS 7 to host the website. When I create the virtual directory and set the default document say Home.aspx and host the site. When I browse the page it shows the home page's html code. I have test this many times but same issue. Any thing wrong in my code aur any issue in hosting the site. Pls do the needfull.
Thanks
Dinesh Kumar
Looks like IIS is not setup to use .NET.
You can install .NET on IIS by going to the framework directory of the version you are using (%WINDIR%\Microsoft.NET\Framework\v.XXXXXX) and executing aspnet_regiis.exe.
Related
We hosted the website in IIS. When we test the home page of our site IIS suddenly offering to download the aspx page instead of rendering .
We hosted the website in IIS 7.0. Website developed with DotnetFramework 4.0.
Please help me in identify the bottom of the problem.
You'll need to drop into the command prompt and navigate to the folder;
c:\windows\microsoft.NET\Framework\V4.0.30319\
and type the command aspnet_regiis -i
this will configure the IIS server to correctly process the aspx files - not sure why it would work previously and then suddenly stop working, have you used this explicit version of .NET on this server before?
You have to configure it once again. Before that, follow some steps mentioned below:
You have to build the web application within your Visual Studio.
After successful build,you have to publish the application and save that published copy to specific folder say 'MyPublieshedApp'.
Start IIS and add new website. You have to point the folder which contains the published content of your application. In this case the folder should be 'MyPublishedApp'.
Set the application pool and set the framework version to ASP.NET 4.0.
5.Then browse one of the page after configuring it into the IIS.
May be this will help you.
I have two ASP.NET sites on my IIS 7 (Windows Server 2008 R2)
First one works perfect, it opens default.aspx page any other aspx pages as well as html, but second site doesn't open neither .aspx nor .html links, so for example if I try to open http://mysite.com/Default.aspx url, it just shows an empty page without any content or any error.
What it could be?
Thanks.
Well, many things can be broken.
Few tips:
Start Chrome, Firefox (with Firebug addon) or Fiddler or any other http proxy and check what the server is sending - is it HTTP 200, 404, something else?
check IIS logs c:\inetpub\logs\Logfiles\w3svc
check EventLog
compare httpmodules in working website with those of the website which is not working
ensure correct app pool with correct .net version is set for site
try to convert website to webapp
if all fails, delete website and create it from scratch. If it works it may suggest that IIS metabase was damaged.
Another workaround that I suggest:
Open the "hosts" file using Notepad in C:\Windows\System32\Drivers\etc\hosts
then add
127.0.0.1 YourWebsite
Next, try to add binding to a site as suggested here at (http://technet.microsoft.com/en-us/library/cc731692%28v=WS.10%29.aspx)
I hope it helps you.
O/S: Windows 7 ,Home Premium
I have just installed IIS manager Express from Web platform installer and Turned on the IIS7 feature from the Program Feature in control panel.
Q) I was playing with IIS Manager (inetmgr) I was able to view the Welcome page on typing localhost but after adding some sites and deleting them I'm unable to see any site hosted on IIS and even can't see Welcome page of IIS
Note: I was assuming IIS switched off ,but its running
Services.msc from start menu > run
Progress:
After trying Update2 from "Andrei Drynov" here is the sanpshot
Is there page iistart.html in C:\inetpub\wwwroot?
Is the default web site there and running?
UPDATE:
You can you can uninstall and then install again IIS components like Default document, if you really want that welcome page:
UPDATE 2:
I was able to reproduce your issue by creating another web site with site1.com as a host name in Site Binding and removing the default web site. Remove the host name there and you will be able to open the welcome page again:
Is the default IIS website running? that means in the IIS can be on, but the website can still be stopped...try restarting the website...and then try --- right click on website>Manage Website>Browse...
I have been trying to follow this tutorial to the letter:
http://library.linode.com/frameworks/mod-mono/ubuntu-10.04-lucid
Here's what I have done so far:
Installed Ubuntu server and successfully run it
I can access and HTML page perfectly fine on the server
I installed MONO on Ubuntu server
I created /srv/www/example.org/public_html & logs
I added the link to the /ect/apache2/sites-available/example.org
I added my ASP.NET file to /srv/www/example.org/public_html/test.aspx
I added a config file: /srv/www/example.org/public_html/test.aspx
I then reloaded apache and went to the web page
I came to a site that listed the available files. I saw web.config and test.aspx. When I click on test.aspx it shows the code instead of the ASP web page. What am I doing wrong?
Basically, Microsoft did just about everything possible to ensure that you need to run ASP.Net on a Microsoft server.
Nevertheless, you should be able to run at least some .aspx scripts on an Apache server, using mod_mono.
Q: Are you sure you installed the mod_mono plugin correctly?
Q: Are you sure you configured Apache to recognize the mod_mono plugin, and invoke it for .aspx files?
Here are a couple of other links that might help you:
http://mono-project.com/Mod_mono
https://help.ubuntu.com/community/ModMono
Note in particular the "troubleshooting" tips at the bottom of the Ubuntu link.
My setup:
Vista 64-bit PC (my local PC)
IIS 7 obviously
VS 2008
I setup a new "Application" manually under the IIS default site. It's running.
The application is pointing to the correct directory (where my default.aspx exists)
I've setup this same exact setup on our dev server running Server 2008 and it runs fine
But for me, when I go to http://localhost/MyAppName I get a 404 not found.
I have no clue why.
So since that did not work and still got a 404, then I tried instead changing from using the VS web server to using IIS in my web project properties in the "Web" tab in VS 2008. Then clicked the "Create Virtual Directory" button and it created a new Application in IIS for me. Same thing though. If I go to that address, I get a 404 on my local machine where it's running.
Ok, I had not installed the IIS 6 functionality of IIS in Vista. I did not know it still used legacy features in IIS 7 to run sites locally....I guess. Not sure why but I guess it uses these IIS6 features. Will have to research why it's dependent on this stuff.
Do you have the home directory to look for "default.aspx" as the default page?
A couple things to check:
First, look at your access logs to see exactly what request is getting logged.
Check your IIS config - you may have a default.aspx page, but is IIS configured to use that as one of the default pages? If you go to http://localhost/AppName/default.aspx do you still get a 404?
If you put a static test.html file in the same directory, can you access it?
These should all help determine the cause.