publish asp.net application on windows 7 - asp.net

I have an asp.net project and I want to install it on iis in another computer
with windows 7(this computer doesn't contain VS)
what I need to install for upload this web site???
and how I upload this web site in iis7?
Thanks

For hosting application on iis In windows7. Please follow the steps.
Open inetmgr.
Create new appool for your application. The apppool version should be equivalent or greater than the version in which you developed the
application.
Right click on default site and create virtual directory.
Select the apppool you created for the application in dropdown.
Give the physical path of your application and Alas name to call your application from browser.
After that you can configure default document, authentication etc.. based on your need.
Then, browse the application to make sure it works.
I hope your windows 7 has iis installed and asp.net is registered in iis. If not, please install the same and regester iis with aspnet_regiis and a option -i Before start hosting.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
For hosting, vs not needed. Windows 7 comes with .net 4.0 by default.
For more details, please refer iis.net site or msdn site for step by step process with graphical example.

Related

Migrate a ASP.Net application from one server to another server

I have developed a ASP.Net MVC 4 application with Visual Web Developer Express 2010. It was successfully published/deployed to a remote server A (development server) using the Web Developer's built-in publishing tool and it works perfectly on it IIS 7.0 with the web deployment component.
Now I want to deploy it to another remote server B (production server). This one sits in an isolated environment and does not have Internet access! Even if server B is a replica of server A, its IIS 7.0 does not have the web deployment tool component installed. So the built-in publishing tool does not work for the web deployment option.
I then tried to publish it using the File System option. I copied the exported files to a new folder on IIS on server B. The folder was configured the same way as its counterpart on server A. I tried the URL on server B and it just gave me directory/files listing on the browser instead of the welcome page of the application.
Has anybody got the experience or tips to solve the issue? Thanks.
Cheers,
Alex
edit:
because it a MVC site, the default document doesn't apply. check the following steps:
IIS Extension Less URLs are enabled and allowed.
ASP.NET 4.0 is installed and registered. C:\Windows\Microsoft.NET\Framework\<version> and then aspnet_regiis -i (this will typically force IIS to use the MVC infrastructure instead of using the default document methodology)
Ensure App Pool is in 4.0 Integrated mode.
Ensue that the IIS Advanced Settings for the website are showing the right root folder path.

How to host an ASP.NET Web Applications site on IIS 7

I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.
The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?
I tried to following:
I copied my entire project directory (so including the .csproj file, the bin folder etc.) to the following location on the remote server, where IIS is running C:\MyProject.
In IIS manager i added a Virtual Directory under Default Web Site. Located my Web Site files in C:\MyProject and added that folder. Then in IIS manager i converted that Virtual Directory to an Application.
But when i browse to my Web Site i get an error:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.
So my question is, what do i have to do in order to run my Web Site on IIS..?
The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.
SoL:
Create a new apppool with classic mode and .net framework equals to your application developed framework.
attach the newly created apppool to your virtual directory.
Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.
If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.
Update .net framework in the server to 4.0 if you have only 2.0.
Then register .net 4.0 version in IIS by running the following command in command prompt.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Try changing Application pool to Classic. To do that open Advanced settings of your application in IIS manager and change Application Pool. There should be "ASP.NET v4.0 Classic" or something similar according to your framework version.
http://technet.microsoft.com/en-us/library/cc731755(v=ws.10).aspx

How to run an ASP.NET web application without VS2010?

Say, I have an ASP.NET web application that I can run in a web browser by opening that solution in VS 2010 and then by going to Debug -> Start without debugging, or by pressing Ctrl+F5.
I was wondering if it's possible to create a link on my desktop to run the same web app but without starting VS2010 first? (Say, by just double-clicking such link.)
Yes, deploy the site to your local IIS
http://www.codeproject.com/Articles/32210/Deployment-of-a-Website-on-IIS
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/33e0a51a-5f8a-40f2-9923-cdd604e1a812.mspx?mfr=true
Create a windows batch file to start the ASP.NET Web Development Server and point it to your application's root directory.
Here's my .bat file:
"C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe" /path:"E:\NITIN" /vpath:"/MyApp" /port:2510
http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
http://www.dotnetperls.com/development-server-bat
Here is a great article describing how to set up your ASP.NET website in IIS. Thus letting it run outside of the visual studio development environment.
You can either upload the website to a hosting server so that the site is accessible from the internet, or you can setup IIS on your development machine and deploy your site to that.
Here is an msdn article with various links on how to go about doing this.
You Want to Run Asp.net Web Site Then U Need To Install IIS 6.0 or Higher in Your Machine..
And want to more guide then Check Out This Link..
https://www.youtube.com/watch?v=aFVcX5W0VEQ

Web deploy error to IIS - application pool managedRuntimeVersion

When trying to deploy an ASP.NET application deployment package to IIS, I receive an error
(The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'.
I have taken these steps:
ensured my server's default .NET Framework version is 4 (restarted the IIS service on the machine)
ensured my web application is set for .NET 4
ensured the application's web.config has no references to requiring .NET 2 or 3.5
What is the root cause of this error, and how can it be solved?
Web Deploy uses the default IIS web site settings while publishing. To change/confirm this on your IIS machine:
go to IIS->Default Web Site->Basic Settings->Application Pool
select ASP.NET v4.0 or the appropriate app pool using the appropriate Framework version
If you're trying to import this application into an existing site, ensure that its application pool is the same version. I was attempting the same, but didn't realize my 'new' website was running on an app pool that was v2.
Be sure that your Application Pools by default are configured also for v4.0 by default.
ASP.NET 4 is installed when you install Visual Studio. However, the installation process does not automatically register ASP.NET 4 with IIS, and existing IIS Web sites are not automatically assigned to.NET 4 application pools.
To fix this, register ASP.NET with IIS and set the application pool of the destination IIS Web site to the .NET Framework version that is required by the package.
To do this, open Command Prompt as administrator and go to C:\Windows\Microsoft.NET\Framework64\v4.0.30319 and type: aspnet_regiis -i
According to Web Deployment FAQ for Visual Studio and ASP.NET
I was trying to use Continuos Deployment in VSTS/TFS, in my Release Definition (which was default), I had a IIS Web App Manage Task (named Manage IISWebApplication), where it had Parent website name setting with the correct website name, and the Virtual Path setting was right as well.
I just had to fix the web site name in the Deployment Process section, where it has the Environment Name and Website name as well.
Silly, but it got me 2 days to notice the web site name was in two places in the Release Definition.

How do you tell IIS 6 to set the .NET version to 2.0 (not 1.1) When New sites are created?

We create new sites in IIS 6 (Windows Server 2003) using IIS Manager. When these sites are created in IIS 6, the ASP.NET version defaults to ASP.NET 1.1. We would like it to default to ASP.NET 2.0. The reason this is a problem for us is that when you take any site on the server and switch the ASP.NET version from ASP.NET 1.1 to ASP.NET 2.0, all web sites recycle.
Is there a setting in the IIS metabase that controls this or a way to create a site via script that sets the ASP.Net version correctly so that we can avoid the IIS reset when setting up each site?
As already mentioned by another, I reference this post whenever I need to change the .NET settings for a site.
As for your question, the following steps (summarized from the linked post) should achieve what you need:
Run aspnet_regiis -lk from any .NET framework folder to list your current settings to help you determine which sites should remain using .NET 1.1. If you know there is a .NET 1.1 site, but it is not explicitly listed by this command, then it is inheriting from the root W3SVC/.
For all .NET 1.1 sites not explicitly listed by the previous command, you will need to force them to use .NET 1.1:
Determine the Identifier ID of the site(s) which you want to force to use .NET 1.1. (Through the IIS 6 Manager, you can determine the Identifier of a site by clicking the "Web Sites" folder on the left side of the tool. On the right side, all your sites will be listed, and the Identifier column shows the ID.)
From the .NET 1.1 framework folder, run aspnet_regiis -sn W3SVC/<Identifier ID>/ROOT/ where <Identifier ID> is the ID of the site which you want to force to use .NET 1.1.
Finally, change the root W3SVC/ to use .NET 2.0 so that all newly created sites will inherit from the root and default to use .NET 2.0. To change the root, from the .NET 2.0 framework folder, run aspnet_regiis -sn W3SVC/.
You can run aspnet_regiis -lk again to verify your settings.
Be warned, running aspnet_regiis -i will remap all of your IIS websites to 2.0. If you have existing 1.1 applications that you want to keep, run aspnet_regiis -ir instead. This will set 2.0 to be the default runtime for IIS, but it won't change the script mappings for existing sites.
Find the directory for the version of .Net you want, for example;
C:\Windows\Microsoft.NET\Framework\v2.0.50727
Get a cmd prompt there and then run aspnet_regiis -i.
Further info # http://weblogs.asp.net/owscott/archive/2006/05/30/ASPNet_5F00_regiis.exe-tool_2C00_-setting-the-default-version-without-forcing-an-upgrade-on-all-sites.aspx
Ryan
The following will set the default website to ASP.NET 2.0:
C:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -sn W3SVC/
Child applications inherit the ASP.NET setting from the parent, so all children will have the new setting.
Alternatively run as variation on this command after setting up the new application.
Rob
Simple answer: Open IIS Manager. In navigation pane, find the .NET2 web site and right click on it. Select "Properties". Then select "ASP.NET" tab. First dropdown on that screen gives you option to select a different version of .NET.
Please be aware -- when I did this, all of the web sites on the web server stopped running. Microsoft support told me that .NET1 and .NET2 should not be run from same general area (default web sites) of the web server. Solution is to create an application pool on the web server for either .NET1 or .NET2 sites and then use that to isolate all sites running the "other" version of .NET. Instruction for creating an application pool can be found under "help" in IIS Manager.
You can create just one application pool and put all sites with same .NET in the same pool or you can create an application pool for each application. Your choice.

Resources