I am going to deploy my asp.net web on IIS 7. For this purpose I have googled and found a tutorial link. I followed all the steps and then run the web, in the result web is not running, its not showing its asp.net page instead of this it is showing directory listing of my web.
When I run the web through visual studio the default page in browser is http://localhost:58276/Home/LogIn?ReturnUrl=%2f
Normally, IIs looks for a certain type of file names that it considers are entry file names.
Usually the start page for ASP.NET applications is Default.apsx.
(You can check that in the IIs manager -> Default Document.
Check that your start page has that name.
You should check the start page as #Magnus Johansson mentioned; if that's not the problem, it might be that you're targeting the wrong ASP.NET version.
Did you specify ASP.NET 4.0 for your Application Pool? If you created your own application pool, you should open up the configuration for it and make sure it's set to .NET Framework v.4.0.
If that's not an option for your application pool, you might not have ASP.NET 4.0 set up on your system (which can happen if you install the .NET Framework 4 before you install IIS 7). If that's the case, you may need to run aspnet_regiis: http://msdn.microsoft.com/en-us/library/ie/k6h9cz8h.aspx. (The set of options you want is probably aspnet_regiis -i)
Related
I am front-end developer trying to brush up the front-end of an existing asp.net mvc application. So I have never used asp before but I thought I would try running it locally on my machine then get to work on the css part of the web application.
Previously I have tried running IIS server locally but in vain, is there a better way to run this project? Sorry I am not allowed to share the repo from where I have cloned the project.
I am using Visual Studio code running on a Windows 10 machine.
I would suggest using Visual Studio. It has its own IIS Express so you can run app locally and open it in any browser and you can also edit all HTML and CSS files.
The Best way to use latest Visual Studio and import your project into it (File->Open-Project/Solution) and run the application in it in debug mode. You can put break point to go through the code and add new codes and even test your application. It is very easy indeed. It has all the utilities for a .NET MVC application.
Open IIS, go to Under Default Web site.
right click and add select Add Application
give alias name and select the physical path of your source code
click Ok
if you get database access Authorization failed.
Open SQL Express Management Studio as an “Administrator” and navigate to Security > Logins > NT AUTHORITY\SYSTEM
Right click on “NT AUTHORITY\SYSTEM” and select Properties. Select “Server Roles” from the left panel and make sure that “public” and “sysadmin” are checked.
Your application will be added under Default Web Site
from there you can browse.
You can have a look at very good article,
how to deploy ASP.NET MVC application on IIS
We have an existing ASP.NET Web Forms application which contains many different Visual Studio web projects. All web projects were configured to run under same localhost root path (e.g. http://localhost:12345/main/projectspecificname). We use state server to keep the session data and cookieless is set to false.
This approach worked OK when using VS2012 and ASP.NET Development Server. However when we tried to run same application from VS2015 + IIS Express we found it cannot keep session data when redirects happen between different web projects. For example, when calls Response.Redirect("project2/index.aspx") from project1/login.aspx, from Page_Load event in project2/index.aspx I see the session variable lost all the data carried on it(i.e. Session.Count == 0). Same debug procedure against ASP.NET Development Server returns a count greater than 0. Again, for IIS Express, all different projects were configured to use project URL like http://localhost:12345/main/projectspecificname.
I have searched a bit and found this SO post IIS Express doesn't keep session data which mentioned a solution as to disable Browser Link in VS, but that doesn't work for my case. I am just wondering whether we missed some settings or this approach won't work for IIS Express. Any help is appreciated.
I found a solution to this problem. Looks like IIS Express treated these projects as different web applications so session initialized every time it tried to connect to another project.
By default Visual Studio creates an <application> node holding information like virtual path, application pool and physical path under <site> section in applicationhost.config for each web project. Remove <application> nodes for the web projects you don't want to run as a separate web application will make them run under same web site as per their physical path indicate.Therefore, session data can be correctly maintained between pages from different projects as they are considered in the same application now.
so my problem Erises as i refuse to advance nor to vs2012/15 nor to mvc 6 i think is the latest and nor using EF... well latest.
as the configuration i am in :
windows 7 .net 4.03... mvc4 iis7
i have a problem adding a new website/application so i could simply publish using built-in arrangement via vs2010... instead..as i did with webforms(my till now approach) copying source to wwwroot by my self.
so the issue is i can not find any article /tutorial to set it correctly as the guidance is to set via web platform referencing this age of versions is via using older Wplatform that has Install Web Deploy - via using option in list "Recommended Server Configuration for Web Hosting Providers" which does not exist in current wplatform...
update i forgot to mention i did not want to set any kind of athuresation till i know what will be the effect and what problems in connectivity to the application it will apply from other hand how easy will it be to hack even via spoofing no sweat
as it seems the problem till now was the access permit to the folder of the project i suggest to not use the vs studio as the folder of the project but to make a copy on a normal directory otherwise u need to set user as the user of iis asp.net iis/nameofpool and give it a read right ...full rights accessing the folder.
I'm trying to deploy an ASP.NET application to localhost using IIS, I've been reading a LOT of tutorials and following them step by step but I just can't seem to make it work...
I created an Application Pool(TestPool) with .NET version 4.0 and gave it every permission to the folder where the application is at.
I then added an application to the Default Web Site and tried to run it at
http://localhost/TestApplication/
But I keep getting:
Any idea what is wrong and how can I solve this?
Versions:
IIS version: 6.2
OS: Windows 8.1
VS 2013 Ultimate: 12.0
VS .NET: 4.6
PS: It's my first attempt at deploying an ASP.NET application so if you need any further information just leave a comment.
EDIT:
It is now running at least thanks to Julian and Marge, but when I run it using VS it has the default view, why isn't it showing when I run it through IIS? When running through IIS it just lists the files:
This error is because your website, in the IIS Server, does not have the Directory Browsing enabled and the default document (default page of the site ex: Default.aspx) configured.
Go to IIS Server IIS > Default Documents and check if the default page of your site is listed, if no, add the page.
Check the related link:
https://support.microsoft.com/en-us/kb/942062
Generally speaking, you do not need to access IIS manager at all to run your webpage on localhost. All what you need to do is right click on the project and then choose properties. In the Web tab you will find Servers section. Make sure the Project Url is something like http://localhost/myproj or simply http://localhost/ then hit Create Virtual Directory. Your webpage should be up by then, and you can access it either in debug mode, or simply by navigating your browser to the Project Url you have chosen.
When you add web application in IIS ex.
That your hostname should be to add in host file which is C:\Windows\System32\drivers\etc"\hosts
ex.
127.0.0.1 test.pln
I am trying to publish a website using IIS, I made a virtual directory and in this directory I've added all the webpages and configured the virtual directory but still I am not able to run my web application.
Here is the step by step method to deploy an asp.net application
http://www.15seconds.com/issue/030806.htm
Please post any error message
Make sure that your are running the right asp.net Version...
check if in the asp.net tab if it's v 1 change it to v2
Could you please let me know the error message.( Check with minimum settings like startUp page , version, try publishing with Wizards etc)
In Visual studio, click on project, Properties, Web.
Under Servers, select Use local IIS Web server, then on Create virtual Directory.
Now, when you debug, the page should open in IIS, and Visual studio has taken care of most of the grudge work of setting up the IIS, all you will probably have to change is the security settings under IIS. Hope this helps.
If it is IIS7 check that your application has enough permissions to run:
IIS Actions Pane:
Basic Settings
Connect as (be sure to log in with Admin account first to test, then create you own specific user. Least Privilege Principle)
Test Settings (Authorization and Authentication is Green!)
Test your webisite
The question doesn't say what exactly the error is but you mentioned that you just created the virtual directory. Did you make it an web application? For IIS 6 follow this
link - Create and Configure Local ASP.NET Web Sites. In IIS7 just right click on it and convert it to application.
If its already a website, did you choose the correct framework? normally when you create a website it ill be assigned the default app-pool. If you have installed multiple dotnet then you might check which framework is in default app-pool. Then change the default app-pool to the correct version that is required by your website, or create a new app-pool.
There can be multiple reasons so if you could provide the error message then it would be easier to resolve the problem.
Thanks.