Master Page Not Loading Properly - asp.net

I have spent a couple days trying to figure out why my asp master page format and controls are being ignored when I try to access a page from my IIS 7.5 server.
I'm using the basic DevStudio ASP web project and everything works when I reference the pages through localhost. But when I try to access it through the server the asp:Menu control in the master page, and any other formatting, is being ignored.
I turned on logging and the only thing I see is a warning that I'm getting access denied to the style sheet. I've added the style sheet folder to the IIS list of virtual directories - still not working.
Any help in resolving this issue will be greatly appreciated.

ApplicationPool of your hosted website may not have the permission to access the files. Check the applicationpool credentials. If the controls not loaded properly, check the DateTime of your IIS server machine.If the future date time is set, you will get this kind of misbehavior.

Related

IIS not running *.cs code

I have deployed asp.net web forms website on windows server 2012 and linked with a subdomain (using Plesk panel).
Now, the website is not running any code-behind files even the Page_Load is not being called.
For testing purposes, I added the javascript alert in Page_Load; it didn't show any message, but it did show when I added alert in *.aspx file, it did show.
I didn't get the actual reason, but seems like IIS configuration error may exist.
Help me resolve the issue, will be appreciable.

IIS Windows Authentication does not work with Webmatrix / Razor CSHTML

I need to use IIS Windows Authentication instead of Anonymous so that I can get the visitors username. The server and all the pages are on a local domain and all visitors are logged into the domain. The problem I am having is that Windows Authentication does not work with Webmatrix pages.
On IIS we just have one site and there are various pages and sections. Some are ASPX and now we also started creating CSHTML with Webmatrix/Razor. When enabling Windows Authentication and disabling Anonymous, any page that you try to load (ASPX, CSHTML, etc...) automatically redirects to /Account/Login?ReturnUrl= which does not exist and results in a 404 error.
I don't know why this happens.
Windows Authentication worked fine before the Webmatrix files were added.
I have tried numerous suggestions and nothing has resolved the issue.
I found several posts online saying that there maybe a bug in Webmatrix and that the WebMatrix.Data.dll and WebMatrix.WebData.dll are causing the issue. So just as a test I deleted these files from the Bin folder and right away the ASPX files started to load fine and authentication worked OK. Problem is that without these DLL's none of the CSHTML pages work which is what we really need.
Is there a fix for this? Removing the DLL's I mentioned is not an option for us since it breaks the most import functions which is querying and displaying data from SQL but at the same time I really need Windows Authentication to work with Webmatrix and CSHTML because we need to know who is using the pages and its impossible when IIS is running in Anonymous mode.

MOSS 2010 virtual path to ASP.NET

I am attempting to host an ASP.NET application inside of my SharePoint site. I want to host a full-application so I'm hoping to run it as a virtual path application.
Following instructions mentioned in other areas around the web, which said that I could go into ISS and create a virtual path inside of my SharePoint site to run the application.
Link (page 4)
After finishing this portion I began getting asked for credentials. I got rid of the credentials request, by browsing to the folder containing my Virtual Path and changing security settings to allow iUSR_ account. I no longer get credentials, but I now get a blank page.
I don't know how to get passed this blank page issue, any help is greatly appreciated.
Background: I realize that I can run an application in the layouts folder, but it doesn't seem to work the same as it references .cs files that should be in the code-behind.
-Update-
The blank page issue is solved if I convert the virtual path to an application. However, it seems that I can't piggy-back off of the SharePoint's user credentials when it's an application.
Have you checked that the AppPool for the MVC site is running as the same user as the sharepoint webapp?

can asp.net routing 3.5 sp1 do this issue?

I have a folder(/MyFolder/) with a dedicated web.config in it that does an impersonating
In that folder I have an asp.net file that use Microsoft report viewer 8.0 named MyReport.aspx
When I view this folder on my machine, it's working perfectly without issue
When I publish my project to the dev server and I'm trying to view the report, I have an issue where the the user that run IIS doesn't have access to something, (rsAccessDenied)
Can asp.net routing cause this issue?
(I'm not at work right now so I can only go by memory so it will be hard to provide more information)
Your impersonation is probably not set up correctly. Check the User.Identity.Name when running locally and on the server.
http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx
In the end, asp.net routing was causing this issue, the web.config wasn't getting loaded.
I had something like this:
http://ip/myreport.aspx
I had to change it to
http://ip/reports/myreport.aspx
I had to have the folder in which the web.config was located in the url

Contents of a code-behind file is rendered instead of a control

I have a user control which is being added to a page dynamically. It works fine on my computer whether a site is running on an integrated Visual Studio server or deployed to IIS.
But when the site is deployed to a production server, I see the contents of a user control's code-behind file instead of a control.
Have you any ideas what can cause this?
Thank you.
EDIT: The site is running on IIS 6 and here is the code I am using to add the control to a page
`this.Controls.Clear();
this.Controls.Add(LoadControl("MyUserControl.ascx"));`
Yikes. That should never happen. Are other ASP.NET pages working correctly? Are you sure ASP.NET is properly registered on the server? I think you'll need to give us some more information... what version of IIS are you running, and post the code where you dynamically add the user control.

Resources