1) Install Web Deploy 1.1 using the Microsoft Web Platform Installer (Start -> All Programs -> Microsoft Web Platform Installer). It's under the Web Server tab.
2) Now you have to open an elevated command prompt and type "net start msdepsvc". This will start the Web Deploy Agent which lets you deploy to the local machine
3) From WebMatrix, open your site and click Publish -> Configure. Here, enter these values:
Server: <computername> (don't enter localhost, you need to enter the computer name)
Username: Administrator (or your local administrator account)
Password: your password :)
Site Name: Default Web Site
Destination URL: http://<computername>
This *should* work. Let me know if you run into issues...
This *should* work. Let me know if you run into issues...
Thanks. Before I go ahead and install Web Deploy on our server, perhaps I should amend my question slightly and explain the problem in a bit more detail, and maybe you can confirm for me if Web Deploy really is the solution I'm looking for.
I've copied my WebMatrix C# site onto our local IIS7 server, created a new application within our default web site and configured it as I would normally do for an ASP.NET application. I've also checked under the applications HTTP Response Handlers to ensure
.cshtml pages are handled.
However, I can't get the site to work. At the moment whenever I attempt to view a page (either directly on the local server or via another machine), the error message I receive states that .cshtml pages are explicitly not served.
Every set of instructions I can find on the web deals only with publishing WebMatrix sites to an external provider. I can't find anything about how to correctly configure IIS7 and deploy to your own local server.
When I deployed locally - I had to trick WebMatrix into giving me the generated "bin" folder with all the razor/webpage .dll's - I simply hit publish, and I gave it all the local enviroment information settings and done. It gave me the bin folder. The dll's
in the bin folder was all I needed to run my cshtml files on a local server.
For some reason, when you you save your project without publishing it doesnt give you the "bin" folder. I guess this is becuase it understands you're working locally on your iis express machine.
So again,
1. Publish your WebMatrix Project (hit the publish button)
2. Enter your publish destination information and credentials.
3. Hit continue and wait...
4. Grab the "bin" folder that was generated in your file system.
5. Place this folder with your project on the IIS7 Server
6. Run your .cshtml page by visiting it via browser
maff101
0 Points
1 Post
Deploying a WebMatrix C# site to IIS7
Jul 30, 2010 01:10 PM|LINK
Hi,
Can anyone provide instructions on how to deploy a WebMatrix c# site to IIS7?
Thanks,
Matt
Vimpyboy
Contributor
3212 Points
651 Posts
MVP
Re: Deploying a WebMatrix C# site to IIS7
Jul 30, 2010 03:27 PM|LINK
Do you want to deploy it to your local IIS or a web host?
http://weblogs.asp.net/mikaelsoderstrom
http://www.twitter.com/vimpyboy
maff102
Member
6 Points
3 Posts
Re: Deploying a WebMatrix C# site to IIS7
Jul 30, 2010 04:39 PM|LINK
Local IIS.
ErikEJ
Member
186 Points
33 Posts
Re: Deploying a WebMatrix C# site to IIS7
Jul 31, 2010 07:49 AM|LINK
Hi, have you seen this: http://erikej.blogspot.com/2010/07/getting-started-with-sql-server-compact.html ?
panic_at_the...
Member
32 Points
6 Posts
Re: Deploying a WebMatrix C# site to IIS7
Aug 02, 2010 03:49 AM|LINK
You can do this, take these steps:
1) Install Web Deploy 1.1 using the Microsoft Web Platform Installer (Start -> All Programs -> Microsoft Web Platform Installer). It's under the Web Server tab.
2) Now you have to open an elevated command prompt and type "net start msdepsvc". This will start the Web Deploy Agent which lets you deploy to the local machine
3) From WebMatrix, open your site and click Publish -> Configure. Here, enter these values:
Server: <computername> (don't enter localhost, you need to enter the computer name)
Username: Administrator (or your local administrator account)
Password: your password :)
Site Name: Default Web Site
Destination URL: http://<computername>
This *should* work. Let me know if you run into issues...
maff102
Member
6 Points
3 Posts
Re: Deploying a WebMatrix C# site to IIS7
Aug 02, 2010 09:52 AM|LINK
Sorry Erik, I can't see any info there about deploying a WebMatrix project.
maff102
Member
6 Points
3 Posts
Re: Deploying a WebMatrix C# site to IIS7
Aug 02, 2010 10:51 AM|LINK
Thanks. Before I go ahead and install Web Deploy on our server, perhaps I should amend my question slightly and explain the problem in a bit more detail, and maybe you can confirm for me if Web Deploy really is the solution I'm looking for.
I've copied my WebMatrix C# site onto our local IIS7 server, created a new application within our default web site and configured it as I would normally do for an ASP.NET application. I've also checked under the applications HTTP Response Handlers to ensure .cshtml pages are handled.
However, I can't get the site to work. At the moment whenever I attempt to view a page (either directly on the local server or via another machine), the error message I receive states that .cshtml pages are explicitly not served.
Every set of instructions I can find on the web deals only with publishing WebMatrix sites to an external provider. I can't find anything about how to correctly configure IIS7 and deploy to your own local server.
Erik5388
Member
81 Points
84 Posts
Re: Deploying a WebMatrix C# site to IIS7
Aug 02, 2010 02:48 PM|LINK
When I deployed locally - I had to trick WebMatrix into giving me the generated "bin" folder with all the razor/webpage .dll's - I simply hit publish, and I gave it all the local enviroment information settings and done. It gave me the bin folder. The dll's in the bin folder was all I needed to run my cshtml files on a local server.
For some reason, when you you save your project without publishing it doesnt give you the "bin" folder. I guess this is becuase it understands you're working locally on your iis express machine.
So again,
1. Publish your WebMatrix Project (hit the publish button)
2. Enter your publish destination information and credentials.
3. Hit continue and wait...
4. Grab the "bin" folder that was generated in your file system.
5. Place this folder with your project on the IIS7 Server
6. Run your .cshtml page by visiting it via browser
This is how I got your situation to work for me.
The DLL's it added were as followed,
Microsoft.Data.dll
Microsoft.Web.Infrastructer.dll
Microsoft.WebPages.Compilation.dll
Microsoft.WebPages.Configuration.dll
Microsoft.WebPages.dll
Microsoft.WebPages.Helpers.dll
Microsoft.WebPages.Helpers.Toolkit.dll
zettersten.com
client side dev
canvas/html5/js/css
wirjones525
Member
41 Points
29 Posts
Re: Deploying a WebMatrix C# site to IIS7
Feb 17, 2011 03:25 PM|LINK
Hi, this is an old thread, but I found good resources for IIS server deployment provided by Simon Tan and thought others would find them useful:
http://forums.asp.net/t/1652300.aspx?How+to+config+the+host+for+webmatrix+
http://learn.iis.net/page.aspx/951/install-server-components/
Cheers,
Bill J