Blog & Blog_dparys
VS2010: Razor Project with “No Build”-Option.
Standard was “build WebSite” which lead into following Error:
\Default.cshtml: ASP.NET runtime error: There is no build provider registered for the extension '.cshtml'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'. C:\Users\js\Documents\My Web Sites\Fotogalerie\Default.cshtml 1 1 C:\...\Fotogalerie\
<add assembly="System.Web.WebPages.Razor, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor"/>
New DB – Connection
When publishing using the FTP protocol, WebMatrix by default keeps track of files that are changed on the local computer. This makes all FTP transfers after the first transfer faster because WebMatrix does not need to obtain a folder list from the remote server to determine what files are different.
There are two resolutions available:
1) (Recommended) Clear the cached list of changed files
- Close WebMatrix
- Open the IIS Express configuration directory in Explorer: %USERPROFILE%\IISExpress\config\PublishUI
- Open the folder named after your site. For example, if your site is named Bakery, open the bakery folder.
- Open the folder named after your remote server. For example, if you are publishing to ftp.contoso.com, open the ftp.contoso.com folder.
- Delete the CSV file in this folder
- Open WebMatrix and try publishing again
2) Disable the feature
- Open WebMatrix
- Click the Application Menu in the top-left corner of the window
- Click Options
- lick Publishing
- Uncheck “Make FTP faster by only publishing the files that have changed on this computer”. Note: This will make FTP transfers significantly slower
.NET Problems: side-by-side configuration:
How to deploy an application using the Web Deploy feature within WebMatrix
If this is the first time you are publishing using WebMatrix, please see this Knowledge Base article first, as its related to obtaining a copy of your Publish Profile and importing it into WebMatrix. Also, to use Web Deploy, you must enable access to the primary user for IIS 7 Manager.
To publish the application using the Web Deploy feature in WebMatrix:
- Click the lower portion of the Publish button, then click Settings
- Select Web Deploy from the Protocol drop down menu
- Server Name: https://webserver.discountasp.net:8172/MsDeploy.axd (Replace webserver with the actual server name, for example; web 710)
- Username: your control panel username, NOT your FTP username
- Password: your control panel password
- Site Name: the path you want the application uploaded to. For Example: “domain-name.com” or “domain-name.com/SUBDIRECTORY” Do NOT include http://www in this field. Use the format described above
- Destination URL: make sure this is in proper URL format. For Example: http://www.domain-name.com or http://www.domain-name.com/subdirectory
If the application requires a connection string:
You can obtain your connection string in Control Panel. MSSQL connection string information is located in the MSSQL section of Control Panel and MySQL information is available in the MySQL section of Control Panel. Please note, you will need to update both the database username and password in the connection string.
Click Save to save your settings and you can now publish by using the Publish button.
Where Can I Find my Web Deployment Publish Settings File for WebMatrix
Your Web Deploy Publishing Information can be located in the Account Info/Edit section of Control Panel
. For development tools such as WebMatrix that will import these settings, you need to perform the following:
- Click the "Download Web Deploy Publish Settings" button
- When prompted, choose to save the file locally somewhere on your computer
- Open WebMatrix and click the lower portion of the Publish button and choose Settings
- Click "Import publish settings" on the right hand side of the new window
- Locate and select the file you downloaded in step One
These are the default settings WebMatrix will suggest when you attempt to publish your application. Depending on your needs, you may need to change them in WebMatrix as described in the Knowledge Base article that covers deploying an application using WebMatrix
Also, neither the connection string nor the password are included for security reasons as they would need to be in plain text.