I created an ASP.net MVC 2 Web Application in Visual Studio 2010. I then added a Web Deployment Project to the solution and added the Primary Output from my web application. I right clicked on the web deployment project in Visual Studio and clicked Install and ran through the install. I then tried to use IIS to browse to the page and got the following:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
I browse to the folder that the application is and all I see is a bin folder and inside that there are just a few dll's. No web.config. Nothing else. Is there something else I need to add to the deployment project other than primary output?
I had to add the Content Files from the Project as well. Once I added both Content Files and Primary Output everything worked fine.
Related
Finally, i have completed my asp.net mvc5 project.
I have used EF code first for database and my solution included two part, the core included Model and frontend included the views and the controller.
Now i want to send the project to my friend that he can publish it in his windows server with IIS server.
My question is which file i have to copy for him that he can publish the WebApp with out installing visual studio in his windows server.
Right click on main MVC project in your solution -> Publish.
Publish method: File System
Target location: your location
In settings Configuration you can set Release or Debug as you need.
After publish you can send whole folder to your friend. Everything that you need should be there (Your bins, views, scripts, css).
Your friend should just create new WebSite in IIS and place all files in folder that he selected.
Ofcourse he should change connection strings and set right settings for ApplocationPool that runnig WebSite.
We have a legacy Web Forms application which we've recently converted from a website project to a web application project.
The Web Forms project is the "startup" project of the solution.
There is an MVC project which is a reference to the Web Forms project.
In the MVC project, there are several view (cshtml) files that are set as "Embedded Resource". When the application is debugged locally in visual studio, these files are found and compiled and the pages are visible.
When the Web Forms project is published (locally), I get an error that says "The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:" etc
The question is how come this works on IIS Express but not on IIS 10? Is there some config settings I can update to make this work?
Do you have a Virtual Path Provider in the WebForms project?
Try installing my project 'EmbeddedResourceVirtualPathProvider'
Install-Package EmbeddedResourceVirtualPathProvider
https://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider/
After successfully following this introduction to Web API 2 (although unable to "run" by pressing f5) I am really confused as to what is built and what is run when you create a WebAPI2 project. The only way I was able to test if it was working was by right clicking the project and clicking View -> View in Browser. I can't seem to find any .exe in the build folder (the app does build fine) to run.
What exactly is built and what is required to run a WebAPI2 projecT?
Your only output in a web project are a bunch of DLL's and maybe some static files that you could be using in your project (see this link about ASP.NET Web Project Folder Structure) . You don't have a .exe or an executable file in this case. Your built app requires a web server in order to execute, and when you are developing a project you have some options. Check this link about Web Servers in Visual Studio.
In order to run your project pressing F5, check if your ASP.NET Web Api project is configured as startup project. Check this link about how to configure it.
If you are still having any issue trying to run your web application in Visual Studio, please provide us with more information about your problem or errors, so we can provide you a better answer.
I have created a simple MVC3 application in Visual studio 2012. Earlier I was using VS2010. Both are currently Installed on my System.
The Problem is that when I publish and Deploy the application on IIS It doesn't works.
It gives Error Code 0x00000000
I tried with different applications but problem remains the same. Any of the application created in VS2012 is not deploying Successfully. Please Help.
I am adding snapshot of publish and error message.
looks like you are publishing an mvc3 app.
If I remember correct for that version you either have to install mvc on the server or include mvc binaries in your output directory.
There was a menu item for mvc project (right click on a project in solution explorer) to add mvc dependencies to some binpub folder. You should look for that.
oh and here is a Hanselman post on the topic
http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx
And another SO question: Why is the _bin_DeployableAssemblies folder specific to web applications?
I have saved my website in the wwwroot folder. when i am running it through Visaul Studio 2008 it s running absolutely fine with path
http://localhost:3840/GettingUserId/default.aspx
but through IIS it is unable to resolve the images URL , not even the links to other pages r working (Parser Error). The path is
http://bhukrk106154d/GettingUserId/default.aspx
I am using IIS 5.0.
Is there any IIS setting that I am missing out.I have simply copied the same website folder inside the C:\Inetpub\wwwroot folder
I have seen parser errors becasue the website is trying to use an old framework version.
Go to the default website properties in inetmgr -> go to asp.net tab -> make sure that asp.net version 2.0 is selected.
If you can post the error message it will be usefull too.