Questions tagged [webmatrix]

Microsoft WebMatrix consists of a basic IDE bundled with a simple but powerful SQL database and a lightweight web server. WebMatrix is no longer recommended as an integrated development environment for ASP.NET Web Pages. Use Visual Studio or Visual Studio Code.

Microsoft WebMatrix is a basic development environment for creating websites. It's bundled with a simple but powerful SQL server (SQL Server Compact) and a lightweight web server (IIS Developer Express).

Languages supported include C#, VB.NET, and PHP. The native view engine uses Razor syntax optimized for HTML development. Although the full ASP.NET stack is available, developers can choose "Web Pages" which offer simplified web development.

It reached end of life in November 2017, so shouldn't be used any more.

Also see: , , ,

1222 questions
7
votes
4 answers

The name 'Database' does not exist in the current context?

I am getting this error when I try to launch my website using WebMatrix. I have a .cs file which makes a call var db = Database.Open("dbase");. I have a database in my project called "dbase". I have no web.config file and no imports for using…
Simon Kiely
  • 5,880
  • 28
  • 94
  • 180
7
votes
1 answer

_PageStart.cshtml vs _AppStart.cshtml in ASP.NET WebPages

What is the difference between _PageStart.cshtml vs _AppStart.cshtml? Can I use them interchangeably?
kazinix
  • 28,987
  • 33
  • 107
  • 157
7
votes
1 answer

Accessing IIS Express from another machine

I want to access the site from another machine, like 192.168.1.11:10369 I found a solution for it, that is: http://bendetat.com/access-iis-express-from-another-machine.html It's working well if I run the project in Web Matrix But doesn't work from…
om_jaipur
  • 2,176
  • 4
  • 30
  • 54
7
votes
1 answer

Creating and Simple Class and Calling a Method from a cshtml File

Could some one give a simple example of creating a simple class with a simple method and calling the method from cshtml file in webmatrix? I am trying to figure out if WebMatrix could be used in an object oriented way that would allow me to take…
Mark H
  • 73
  • 1
  • 1
  • 3
7
votes
3 answers

Is there an easy way to store an array into a single column in a SQL Server CE database?

I have reviewed possible answers here (for PHP, I think): http://www.lateralcode.com/store-array-database/ but I am unable to find a C#.net version of serialize/deserialize. Would this be done the same as the way shown in my link, above, or is there…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
7
votes
0 answers

system.webServer/fastCgi/application not working in web.config

How do I register an IIS FastCGI application in a MSDeploy's web.config file as documented? I'm trying to build a simple test MS Web Deploy package installable by the Web Platform Installer via a custom feed. I'm trying to register a FastCGI…
Ross Patterson
  • 5,702
  • 20
  • 38
7
votes
5 answers

Webmatrix 2 broken

I made the mistake of upgrading webmatrix 2 that I had running to the latest version and now it's broken everything! From the about screen this is what I am running: Version 2.0 WebMatrix: 7.1.1674.0 IIS Express: 8.0.8418.0 .NET Framework:…
PazoozaTest Pazman
  • 749
  • 12
  • 33
6
votes
1 answer

How to display Exception Message (Razor/C#)

I come from a C# background with Desktop apps and mostly PHP for web stuff, and I thought that with Razor code you could do something like this to display an exception message (just like you can in desktop apps): @{ // Other code.... try …
βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33
6
votes
2 answers

Saving DateTime with WebMatrix and Razor

I am developing a project that has a DateTime field. In it I'm using jQuery for the user to select the date format 'dd/MM/yyyy' taking into account that the date is not a required field. How do you do to save DateTime fields not required in…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
6
votes
2 answers

Equivalent of End / Response.End in razor?

I'm trying to stop the rest of a page loading based on some parameters; but am not sure of the correct syntax. @if(dayRes + dayTri == 2){Sorry, etc @Response.End} The above throws this error: CS1502: The best overloaded method match…
cavill
  • 590
  • 6
  • 19
6
votes
2 answers

Webmatrix and Stored Procedures

I'm fooling around with WebMatrix, and so far the best way I've figured out how to use stored procedures with Razor/WebMatrix is like so- @if (IsPost) { var LinkName = Request["LinkName"]; var LinkURL = Request["LinkURL"]; string sQ =…
infocyde
  • 4,140
  • 2
  • 25
  • 36
6
votes
1 answer

How can I access a single XML element's value using C#.net web-pages with WebMatrix?

I've looked at a lot of resources, done a lot of research, and tried many "best-guesses" to access a single element at a time using WebMatrix with C#, web-pages, however nothing I am trying is getting through. Consider a simple xml document that…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
6
votes
3 answers

How can I get started using OpenID/OAuth with my WebMatrix site?

If I misuse or confuse the terms OpenID and OAuth, I apologize, I am still new to this whole decentralized login process. I have been trying for days now to get my site (built in WebMatrix) to recognize a Google login. The problem is I need this…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
6
votes
1 answer

Get binary image data from input type "file" using JavaScript/jQuery for use with picture preview with AJAX in WebMatrix

I have had trouble when researching or otherwise trying to figure out how (if it's even possible) to get binary image data using JavaScript/jQuery from an html input element of type file. I'm using WebMatrix (C#), but it may not be necessary to know…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
6
votes
3 answers

Error running node app in WebMatrix

I installed WebMatrix and followed these instructions to install IIS 7 on my Windows 7 machine. When I click 'Run' to run my express node app, the browser pops up and tells me The iisnode module is unable to start the node.exe process. Make sure…
Scott Tesler
  • 39,441
  • 4
  • 25
  • 20
1 2
3
81 82