Hosting a website built with webmatrix - webmatrix

I had built a website using Webmatrix 3 and used the '.sdf' database. However, I couldn't use the web deploy technique since my host doesn't allow it.
The files have an extension of '.cshtml'
I've uploaded the files using ftp and when I open the link to those pages, they only show the code like they show when they are opened manually by double clicking on them not even on a localhost.
Is there a way I can host my website with the .sdf database?

Sorry, the ASP.NET Web Pages framework (the pages you're talking about '.cshtml') needs your to have the Web Pages framework installed so that they can run.
IIS needs the Web Pages add on to work with the .cshtml files, and to render the HTML using the Razor syntax, that you're trying to tell me. I remember, once I opened the .cshtml page using Opera Web Server, and it gave me the same error since it was not able to render the HTML and thought the code itself was the HTML.
The problem about the .sdf is that you cannot use it. If they don't support Web Deploy, I think they don't support the SQL Server CE database either. This means that you cannot use them.
As, alread told, you can only ask your hosting service provider for help in this scenario. They can guide you further. Or can forward you to some other branch where these services are supported.

Related

Can sites built with Rapidweaver be worked on without Rapidweaver?

A friend has asked me to do some work on his existing site which was built in Rapidweaver. I'm on Windows, so is there another way I can access and edit his site?
The Rapidweaver project file is meant to be edited only in Rapidweaver, really. As far as I know, the only way around would be to use an HTML editor to modify the pages that are already in the server. However, I would not reccomend you to do it unless you are not going back to Rapidweaver anymore. Because changing the files in the server does not update your local Rapidweaver files. So, you could end up editing something in the server, then getting back to Rapidweaver and upload a "new" version that would not be completely up to date (the previous changes in the server version would be overriden by the older rapidweaver project).
For that kind of work, a CMS (Content Management System) is a more flexible way to work. Nowadays, one of the most common is Wordpress. It will require an inicial setup but after it is working it can be updated from anywhere via web browser, or even from an app in your iPhone. But it is not a Rapidweaver based sollution.
There are a couple CMS related plugins or stacks (Dropkick CMS, Armadillo, Easy CMS, Total CMS...) for Rapidweaver that could also be useful in this context. Once again, first you would need to buy a licence and to setup the website using one of those plugins or stacks. Only then you would be able to edit on the go.

Not able to deploy MVC3 to IIS correctly

I've followed the steps to bin deploy my MVC3 application into IIS7, but when I browse it after deployment, it is showing me a list of file similar to ftp website instead running the pages.
The dlls that are explicitly added in the bin folder of my application are:
Microsoft.Web.Infrastructure
System.Web.Abstractions
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.Routing
System.Web.WebPages.Deployment
System.Web.WebPages
System.Web.WebPages.Razor
I set security to everyone full control to test, so its not a security issue for sure
and when I try to navigate to home/index for example, IIS wont recognize the path, see error below:
.net 4 is installed, application pool of the website is .net 4 also
not able to find solutions
What I am missing to do, any suggestions ?
Thanks
In order for IIS (this only applies to IIS 7+) to process MVC request, the easiest option is to set your Application Pool pipeline to Integrated instead of Classic. Without giving an MSDN level reason as to why this is, essentially classic mode wants every request to have a file extension. If the request does not have a file extension, IIS will go look for that directory. Integrated mode allows the request to go into the ASP.NET pipeline, which will then trigger your routing in your MVC site and the dynamic content will appear.

Deploying Asp.net MVC web application

I have been trying to find a neat tutorial, guide or step by step instructions for deploying an Asp.net MVC3 webapp but have found nothing so far. Everyone talks about his version of the stroy and different type of MVC versions.
Right now, I have build a simple Asp.net MVC web application which i need to deploy on my shared hosting account. In a very simple manner, I need to know which files should i copy. Do i upload everything in my webproject directory to the server including the controller directory, views, models, content and bin directory ?. What about the Global.asax, web.config, packages.config, myapp.publish.xml.
In short, I have no idea which files should be uploaded and which should be not. I am sure of one thing that i need few(MVC and Razor dlls) following dlls in bin directory. Just treat me as someone who has never deployed any website
NOTE:- I don't have VS SP1 installed and it doesn't install either. Basically i need a manual procedure.
Here is a tutorial on the MSDN site about how to deploy an MVC application. Typically, hosts will also now have WebDeploy available, which is a very easy way to deploy and update your application without having to worry about what files to copy.

Is there a better way to deploy web applications using Visual Studio 2010?

I am using Visual Studio 2010 and IIS 7.0 .Currently when I want to deploy an website to my web server I follow these steps -
1.Right-click on website and say publish..to get the entire site copied to a local folder.
2.Next using filezilla just ftp the copied files to the web server.
The problem is I have to deploy entire website all the time since I can't keep a track of the changes. Although I do find my way easier and without problems. I dont want to a whole lot of configuration and deployment packages unless it is really worth it and also relatively easy to do. Is there a better way I should do the deployment ? Any suggestions are welcome !
You could use the Web Deployment tool. It needs to be installed on the webserver too and can even take care of publishing a sql server database.
http://www.iis.net/download/WebDeploy
Do NOT use the Web Platform installer to install this package.
You can just right click on website and Publish Web Site; the Publish Website Wizard opens. You can click the ... button to browse on the Target Location textbox and choose FTP over in the left hand side, then put in your FTP credentials.
You can tick 'Allow this precompiled site to be updateable' so if you need to make minor changes (such as scripts, css, or html) but I don't know how reliable that is.
Good luck!
Scott Gu just published an article about the Deploy Features in VS today:
http://weblogs.asp.net/scottgu/archive/2010/07/29/vs-2010-web-deployment.aspx
Personally I use Dispatch for ASP.NET. Works well for me. It only uploads the files that have changed and can check for files that are missing locally or on the server.
http://dispatchasp.net/
If you are using the Publish Wizard then you have no choice but to deploy the whole site. There is no way for the wizard to look at the files on the server and know definitively if the file has changed or not (it could look at file size or something, but that's not 100% guarantee of no change and FTP doesn't offer an easy way to do a checksum algorithm).
Other then that, do it the way you would do it on any other language/tool. Just manually FTP the files you've changed. Of course, this means you have know which files are side-affected by your changes. And if you're not confident as to what files you've side affected.... publish wizard is your friend :)

How to Package/Publish SQL databases with ASP.NET MVC 2 Website?

I'm trying to deploy my ASP.NET MVC 2 Website for the first time on a local IIS 7 server, which is configured and running. I've made successful deployments using the Web Deploy option without the databases (so the site isn't fully working yet). Most of the deployment settings are pretty intuitive, however, I have problems with the Package/Publish SQL -tab in the project settings. Here's how it looks like with the errors I'm getting (click for bigger view).
It asks for Connection String, but I have no idea what to put there. It also gives a weird error about another process using a schema file.
Any pointers are welcome. I'm looking for the easiest way to just get it running.
I was able to get the databases running by unchecking the "Exclude files from the App Data folder" in Package/Publish Web tab. It then simply copies the database files.

Resources