Hello everyone I want to ask how to publish a MVC3 project on IIS 7
I have done these steps:
Installed neccessary dlls
Microsoft.Web.Infastructure
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
Changed Framework
But it still does not publish
When you deploy it you can keep your projet in root folder where local disk C: or whatever and please dont forget to which framework you are using and you can change the framework at application pool
Requested URL: /Views/Home/Index.cshtml
Your requested URL is wrong. You cannot directly access Views. You should pass through a controller action, so the correct url that you need to type in your browser is /home/index.
You may take a look at some of the tutorials about ASP.NET MVC here: http://asp.net/mvc
Related
Can I host a MVC3 website on an Azure Web Site ?
I try to deploy an MVC3 website to Azure Web Sites (in preview).
If I leave the web.config file I got an error.
If I remove the web.config file, like I did with a normal ASP.net website, then I got other errors that seems related to MVC3.
Thanks
I ended up following this tutorial.
http://www.windowsazure.com/en-us/develop/net/tutorials/get-started/
It seems that if you if you have some additional configuration, you need the SDK.
To publish plain aspx websites, you dont need the SDK.
In terms of running an MVC website in Azure websites, I found this: http://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/
I create a Zend project. My images are in folder public/icons and they available when I run project using url http://localhost/zendproject/public/icons/image.png but when I use virtualhost http://zend.gameblog I can't get this image by url http://zendgameblog/icons/image.png.
Browser says "403 Forbidden" and I can't understand why. I also have public/captcha folder and any image from this location always available by url http://zend.gameblog/captcha/image.png.
I use: win7 x86, WAMP, zend framework 1.12, Zend Studio 9.0.4. Some of resources and folders I created manually not via Zend Studio.
Please help me and tell whether I will have such problems when I'll run my project at real server?
For all css, js and img on web site use baseUrl helper:
$this->baseUrl('/icons/image.png');
//or
$this->baseUrl('/css/css_file.css');
and for all links on web site use URL View Helper: $this->url(...)
In VS2010 ,I published my asp.net mvc3 web application as a file system and on IIS Manager, I created a new virtual directory(file system) and created a new website. But browsing the website is not redirecting me to the desired controller action. Can anyone suggest where i am going wrong?
IIS6 doesn't support extensionless urls by default. You will have to configure a wildcard mapping if you want to use such urls. Otherwise you will need to modify your routing in order to append an extension in all your urls that is associated with the aspnet_isapi filter in IIS.
Here's a guide that you may checkout: ASP.NET MVC 3 Extensionless URLs on IIS 6
I would like to try testing virtual hosting of an ASP.Net MVC website on my local machine. In Visual Studio in the Web tab of the properties file for the MVC project, I selected Use Local IIS Web Server. By "virtual hosting", what I really mean is that I'm trying to make sure that pages load correctly for urls of the form http://sub-domain-i.my-domain.com/MyMvcProject/Controller/Action, where I'm hoping to test multiple subdomains in place of sub-domain-i. In production, everything will be running under a single IP address on one server. I also hope to test https for urls of this form using a wildcard ssl certificate, but currently I'm having trouble configuring Visual Studio to just test regular http. Prior to worrying about sub-domains, the Project Url field in the Web tab of the properties folder for my MVC project said "http://localhost/MyMvcProject", and everything worked fine. However, after changing this to "http://sub-domain-1.my-domain.com/MyMvcProject" and then adding the following line into my C:\Windows\System32\drivers\etc\hosts file,
127.0.0.1 sub-domain-1.my-domain.com
Visual Studio produces the error "Unable to create the virtual directory. http://sub-domain-1.my-domain.com/MyMvcProject". Does anyone know what I might be doing wrong?
Many thanks in advance!
Edit: I've just discovered that if I select Use Custom Web Server instead of Use Local IIS Web server, it works and I don't get the popup error from Visual Studio. I'm still not sure why this solution works, though, or what I was doing wrong by selecting Use Custom Web Server...
A little late, but I hope it helps somebody.
You need to create the binding in the IIS website prior to add it to the project url of the project. That binding must be like
http | sub-domain-1.my-domain.com | 80 | * or 127.0.0.1
How to create a binding
I have a webform (using the ReportViewer) that is in an MVC application. It is outside the Views folder in a root level folder called Reports. The webform page works correctly when using VS2010 and the web server (Development Server, WebDev.WebServer, Cassini). When using IIS7.5 with an integrated Application Pool (also tried Classic and set the ISAPI restrictions to allow), it does not work. I have the modules..handlers item (Reserved-ReportViewerWebControl-axd) in web.config.
I am getting this page result: "The resource cannot be found." / Description: HTTP 404. The resource you are looking for ...
I hope someone has a fix for this.
Thanks in advance.
Try putting the file(s) under the content folder. That should remove any route problems.