ASP.NET Razor syntax is a simple programming syntax that lets you embed server-based code into a Web page that can also contain HTML markup, CSS information, and client script (JavaScript). Razor syntax is based on ASP.NET, which is the part of the .NET Framework that's specifically designed for creating Web applications. Razor syntax gives you all the power of ASP.NET, but using a simplified syntax that's easier to learn if you are a beginner and that makes you more productive if you are an expert. Even though this syntax is easy to use, its family relationship to ASP.NET and the .NET Framework means that as your Web applications become more sophisticated, you have the power of the larger frameworks available to you.

Einleitung

Download

Blog & Blog_dparys

image

 

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\

<assemblies>

<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

</assemblies>

<buildProviders>

<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor"/>

</buildProviders>

 

 

New DB – Connection

http://www.asp.net/webmatrix/tutorials/connecting-to-a-sql-server-or-mysql-database-in-webmatrix

 

 

http://learn.iis.net/page.aspx/1016/when-publishing-a-site-from-webmatrix-using-the-ftp-protocol-some-files-are-not-listed-in-the-publish-preview-dialog/?language=de-DE

 

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

  1. Close WebMatrix
  2. Open the IIS Express configuration directory in Explorer: %USERPROFILE%\IISExpress\config\PublishUI
  3. Open the folder named after your site. For example, if your site is named Bakery, open the bakery folder.
  4. Open the folder named after your remote server. For example, if you are publishing to ftp.contoso.com, open the ftp.contoso.com folder.
  5. Delete the CSV file in this folder
  6. Open WebMatrix and try publishing again

2) Disable the feature

  1. Open WebMatrix
  2. Click the Application Menu in the top-left corner of the window
  3. Click Options
  4. lick Publishing
  5. Uncheck “Make FTP faster by only publishing the files that have changed on this computer”. Note: This will make FTP transfers significantly slower

 

http://learn.iis.net/page.aspx/334/install-and-configure-iis-7-on-server-core/

http://blogs.iis.net/ruslany/archive/2009/02/26/setup-iis-on-server-core-windows-server-2008-r2.aspx

http://learn.iis.net/page.aspx/1000/microsoft-webmatrix-database-errors-while-publishing-and-downloading-sites/

.NET Problems: side-by-side configuration:

http://fantom.org/sidewalk/topic/673

 

http://www.iis.net/download/IISManager

 

http://learn.iis.net/page.aspx/871/publish-your-website/

 

How to deploy an application using the Web Deploy feature within WebMatrix

NOTE:
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.

 

image

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
NOTE:
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.

http://support.discountasp.net/KB/c3/authoring-tools.aspx

Datenbankinhalte anzeigen