deploy mvc2 application in IIS7 in Windows Server 2008 R2 - asp.net-mvc-2

I am trying to deploy my MVC2 application on the IIS7 of my Windows Server 2008 R2 to allow non-developpers to test it.
I deployed through webdeploy, it didn't work.
I just copied the files after a build, didn't work.
I copied the published file, didn't worked...
When I click on the web site link in my IIS, nothing append.
I don't know what I am doing wrong..
Somebody could help me?
Thanks in advance

If you can give some more details on what happens when you try to browse to the site on the server (do you get a yellow screen exception, 404 error, etc) it will help to identify the cause. Without knowing more details, here are some suggestions:
If you don't have MVC 2 installed on your server (which is not a requirement), make sure you are doing the following:
In your Visual Studio project, under References, make sure you set the "Copy Local" property to "True" for System.Web.Mvc. This will deploy the dll to your site bin dir when you do a web deploy.
Make sure the .NET Framework version 4 is installed on the server. See here for more details.
In IIS, make sure the Application Pool that the site is using is set to use v4.0 of the .NET Framework.

Related

How to deploy ASP.NET MVC4 application with SQL Server CE to Azure website

I deployed a ASP.NET MVC4 app with SQL Server CE database, but I'm getting
Sorry, an error occurred while processing your request
I am using VS2012 to publish this app to azure website. How can I solve this issue? Thanks.
To summarize and so an answer can get marked on this to help the next person that comes by.
When running into issues on azure-web-sites FTP is a handy debugging tool which enables you to:
Verify that the dll exists in your bin directory
Sometimes the .gitignore file blocks directories from being checked in
Verify that your web.config file has the proper version of the assembly configured
NuGet can help, but it's ultimately up to you to verify your dependencies
Here is a good article to follow on the subject: http://www.dotnetcurry.com/showarticle.aspx?ID=883
Unfortunately with VS 2013 Compact edition is not supported any more, so things are somewhat tricky.

Deploying ASP.Net 4.0 website on IIS 6.0

I recently upgraded an ASP.Net 2.0 website to ASP.Net 4.0 using VS2010 upgrade option.
Website works fine in cassini and even on our Windows 2003 server with IIS 6.0
But it will not come up on the client's environment.
Client too has a Windows Server 2003 with IIS 6.0 and .NEt Framework 4.0 installed.
I have registered ASP.NEt 4.0 with IIS 6.0 using
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –ir
also configured the website with .NEt framework 4.0 like below
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>ASPNET_REGIIS -norestart -s "W3SVC
/1/ROOT/Website"
I have assigned the website a separate apppool dedicated to it.
I have tried restarting IIS and the machine but to no avail.
I have verified that under "Website Extensions" ASP.NEt 4.0 is allowed and also checked the site's configuration to confirm that .aspx among other is mapped to .NEt 4.0
I have given the internet user read access to the website directory.
I have been getting
"Server Application not available"
I also getting the following in the event log
Failed to initialize the AppDomain:/LM/W3SVC/1/Root/Website
Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Access is denied.
Another one after this event is
Failed to execute request because the App-Domain could not be created.
Error: 0x80070005 Access is denied.
Website uses Active Reports 6.0 and elmah. That's it.
I would appreciate any tips/pointers to figure this issue out.
Thanks
I could not get the above scenario to work.
So I downgraded the website to .Net 3.5 which uses Framework 2.0 and this made deployment painless.
Not sure what it was about asp.net 4.0 and IIS 6.0 but I could not get to work in the client't environment even though I had it working in our test environment.
If you end up getting in a similar situation again (or for anyone else landing on this from a search), try granting the IIS User access to the 'Temporary ASP.Net Files' folder (under a relavant folder in C:\Windows\Microsoft.Net).
I've run into this a couple of times and that generally seems to work at least in my development environment. You'll likely want to do a bit more research before applying this in production.

ASP.NET MVC 2 + VS2k10 Empty Start Page

I have a problem where, on some developer machines, everything resolves correctly and the start page is as expected (/Home/Index), but on other developer machines, it will just render a directory listing of the website root. When creating a virtual directory, it works, but we would prefer to use the development server initially if possible.
It's worth mentioning the OS we are working with is XP.
Any help would be greatly appreciated!
Are you talking about running your website through IIS or through Visual Studio's built in web server (Cassini)?
It sounds like you are using IIS and it is not configured for running MVC properly but without further information it's hard to say.
I would compare the IIS configuration between a working machine and one that doesn't

ASP.NET Ajax client framework failed to load

We developed an web application using visual studio 2008. In my development PC, the application is working fine. In production server I am getting the following exception "ASP.NET AJAX CLIENT FRAMEWORK FAILED TO LOAD". What should I do to make it work?
Thanks,
P.Gopalakrishnan.
I'd start with making sure all of the appropriate service packs are applied and that the 3.5 framework is actually installed on the box.
Also, make sure any assembly you reference that isn't part of your deployment is gac'd on the machine. Check version numbers.
All else being equal, I'd guess the server is just way out of date on it's updates.

Crystal Reports Viewer in ASP.NET3.5 App

I created a ASP.NET3.5 website having a crystalreportviewer in it, it works fine if I run through visual studio 2008 or on my own machine. But when i deployed project on web server, it started giving me error.
Firstly it was giving error on first page that CrystalDecision.web assembly can't be found, then I installed Crytal Runtime 2008 on my web server. After installation application seems like ok, but when I opened page with CrystalReportViewer it gave me different error, as following:
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any idea about it??
You probably have slightly different versions of the crystal assemblies on the server and your development machine. Compare the version numbers in c:\windows\assembly on both and see if there is a difference. If there is, either update the server or change the version numbers for the assemblies in web.config.
Also, The located assembly's manifest definition does not match the assembly reference
After spending almost 2hrs I finally found the fix.
Uninstall the Crystal Reports run time from web server.
Check if web server still have \program files\Business object folder, if still exist then delete it. Ensure other applications are not dependent on it.
Give Read and Write access permissions to ASPNET user on \windows\Temp folder
Install Crystal Report run time now.
Restart IIS
Following these steps should fix the crystal report viewer problem.
But then one more problem arises, crystal report viewer doesnt show the icons, the reason is crystal report viewer looks for aspnet_client\system_web\2_0_50727 folder in root folder of the website. In my case I have multiple websites on my server including .NET 1.1, 2.0 and ASP, so I have wwwrootASP2.0 folder for this website. But by default web server created aspnet_client\system_web\2_0_50727 folder under default website (wwwroot). So, the fix is, just copy that aspnet_client\system_web\2_0_50727 folder into your website's root directory. Bingo !!!!!! It works fine now.
I hope it will help,
Cheers.
I just wanted to add that an easier way seems to be creating a virtual directory under you web application called aspnet_client that points to C:\Inetpub\wwwroot\aspnet_client.
This also makes the images on the crystal report viewer show up. It was tested with visual studio 2008 crystal basic on IIS running on server 2003.
I figured this out after reading http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/e2dc93b3-e594-4ae6-ba92-9440ccc7f6be.