MVC website on IIS server issue - asp.net-mvc

MVC 4 website developed in .net 4.5, vs 2012 express on win8
it works fine on local-host
but deployed on web (see link) have many errors
not all image get rendered
CSS font not working properly.
when i click logo in HTML source it give mi 404 not found (all resources are present some get renders and some not)

Have you checked all your MIME types in IIS to ensure that you're able to serve .PNGs? Just checking...
Which CSS font are you referring to?

Related

Razor views not generating html after deploying Umbraco 7.2 in IIS 7

I am new to Umbraco, so I started creating a site to play a bit with it. While I had my site running on IIS express (either from VS or WebMatrix) everything worked fine. After deploying the site to IIS 7, the razor views of the front end are display in plain text, meaning that I actually see Razor syntax in the browser. Umbraco back office is working perfect though, except when I hit preview, in that case I get the plain Razor syntax again. I then try to deploy a simple new MVC project to IIS and the Razor engine worked just fine, so I guess is not a problem in IIS but in Umbraco configuration. Is there any configuration tweak I need to take care in Umbraco configuration to solve this problem? Thanks in advance for the help.
I also tried to deploy it in the IIS of my local development machine (the same in which it runs OK in IIS-express) which has the right framework and everything and I got the same cshtml display in the browser.
After struggling a bit more with the problem I found the issue causing this behavior. After installing the starter kit a lot of files are generated in the folder and subfolders of the solution. In order to publish the solution to generate the contents of your website the VS project needs to have all these files included as project files. I found out that some views were excluded of the project and thus not being generated when publishing. I included the missing views and double check that all important files were part of the project and problem solved.

ASP.NET MVC 4 on IIS 7.5 on Windows server 2008 r2 does not render css, js

I have an ASP.NET MVC 4 app that runs in IIS 7.5 on Windows Server 2008 R2 the site loads fine images show, javascript & css link tags when click shows 403 - forbidden access.
I already tried lots of fix that I googled such as Installing the Static Content in the Role Service which is now installed also put in the runAllManagedModulesForAllRequests=true in the config. also set the folder security of my website in the wwwroot to Full Control for IIS_IUSR and Everyone and inherit them to subfolders and files but stil nothing.
dont know why it does not work in windows server 2008.
But in my windows 7 running iis 7 it works fine css & javascript renders just fine.
Please help..
I would like to suggest one thing.
As you have tried all possible option like aspnet_regiis -i
I would like to test one more option.
Add your site in internet explorer trusted site list.
Internet Option -> security -> trusted sites ( click buttion sites)
Add your site with domain name into that and access it.
Also it would be nice if you provide where you hosted your css and js file. ( Is it hosted on diffrent site on same site content ?)

Deploying an MVC in IIS7

I have some Problems about deploying an MVC-site.
What I did:
Install Windows Server 2008 R2 SP1
Add the IIS 7.5 Feature
Install .Net 4
Register .net in the iis, using "aspne_regiis -ir"
Add a new Application at the Default Web Site
Choose my application
Choose the DefaultAppPool
call up localhost/test in the IE
The Problem:
The Site is not correctly presented
e.g. The text is not presented in the right colors but only in black
there are no Images shown
the dll's, located in the applicationfolder are not used
Here two pictures what it is supposed to look like and what it actualy looks like
what it looks like
what it is supposed to look like
I used different "how to's" about this topic but could not find my mistake.
So what do I have to do to display the Site correct?
Tanks.
An Workmate found the Answer. The StaticFileHandler for .css (or other static file types) was missing and needed to be included.

Crystal Reports CrystalImageHandler and MVC .NET

I am unable to show images in CR reports. I'm developing a MVC 2 project in VS 2008 with Crystal Reports that comes with it (10.5). Everything works fine, except for images. I can see them in the preview mode within the CR designer, but not when the app is deployed, which means I am loading data OK but something's wrong with IIS and/or routing.
When running the app, images appear with the red cross and if I navigate to the following url directly I get a 404 error.
http://localhost:1234/CrystalImageHandler.aspx
I think my problem is similar to the one here but that workaround doesn't seem to work for me.
I should also comment that I'm using the Areas feature within MVC.
EDIT: Forgot to add: When exporting the report to PDF the images are shown ok.
I don't know much about crystal reports, but is there an Http Handler? If there is and you are running IIS 7 on the live server, is the handler registered in the web.config under both system.web/httpHandlers and under system.webServer/handlers?
I forget to register the handlers under system.webServer/handlers for our IIS 7 server sometimes and we were having a similar issue with the Microsoft Charting Controls.

asp.net mvc - site works fine locally but not after deployment

i have an asp.net mvc website. http:/mywebsite.com (just for this example)
I have been testing this asp.net mvc website locally on my machine and everything works fine on my local machine during testing. When i deploy to my web server
when i bring up http://mywebsite.com it goes to HomeController and load the view Views/Home/Index.aspx (which is perfect). So the main default page is fine.
The issue is, if i click any other other links (again that all seem to work fine locally) i get the following error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Please try the following:
* Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
* If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
* Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
some examples would be:
http:/mywebsite.com\Photos
http:/mywebsite.com\Links
there definitely are controllers and views setup for this (or it wouldn't work locally).
does anyone have any idea how this might work fine locally but somehow on the webserver it doesn't
Are you running the site on II7 in integrated mode? If not, you need to add a wildcard handler so that all URLs get mapped to your application. See Phil Haack's blog post on running ASP.NET MVC ON IIS 6.
Something else to watch out for. I had a static website - deployed on IIS 7.5. Added some MVC Controllers to handle some simple server side apps and then re-deployed it. I didn't copy the web.config file, because I wrongly assumed that everything that was needed was in the one that was automatically created by the server.
You must copy the web.config up as well.

Resources