Parse Error when application is deployed to IIS - asp.net

I have an ASP.NET application written in .NET 4.0. When I run the application through Visual Studio, everything works and looks good. Same thing when I deploy it to IIS7 on my local machine. However, when I deploy it to another box running on Windows Server 2008 R2 with .NET 4.0 and IIS7, I get the following parse error:
Cannot create an object of type 'System.Web.UI.WebControls.TextBoxMode' from its
string representation 'Number' for the 'TextMode' property.
It's complaining that the TextMode property on asp:TextBox doesn't contain the Number option, even though it works perfectly fine on my local IIS. I came across this post and people are suggesting the two machines have different .NET versions. This is not the case for me; both machines are have .NET 4.0 and IIS7.
Besides this error, other pages are also rendered differently style-wise. For example, IIS on the server machine doesn't respect the Width property on any of the asp:TextBox controls; I have to apply the width as a style, even though my local IIS renders them just fine. I'm using IE10 w/o compatibility mode.
I originally thought the problem might have been with missing js or style files, but IE reports success status for all content files in the Network Profiler window.
I'm truly lost at this point. The code, IIS settings, and .NET versions are exactly identical on these two boxes, but the pages are rendered differently. The only thing I can think of is that some other Web component was installed with Visual Studio that is changing the way IIS renders aspx pages. Is that possible? If anyone has come across this issue at some point I'd appreciate it if you could give me some pointers as to what could be causing the issue.

So I finally figured out what the problem was. The parse error did in fact have something to do with .NET. I have .NET 4.5 installed on my machine but not on the server. What I'm still confused about is that the target version for my application is 4.5, so if the Number option exists only in 4.5, why does Visual Studio even display it? Not sure if that's a bug or if I'm overlooking something.
As for the discrepancies between local and server IIS, it turned out I had to install the ASP.NET Browser Definitions Hotfix (KB2600088) on the server. That fixed all the styling issues.

Related

Import existing asp.net website on Visual Studio for mac

I'm working as frontend developer in a company which uses asp.net for its website. I usually work on mac and I need to setup my localhost to work on the website, but something's wrong with the project. They provided me the folder with all the files (aspx, aspx.cs, dll etc), and I'm supposed to build my own solution file. Visual Studio for macOS doesn't give me the possibility to create an empty website project (VS for pc does), or maybe I'm selecting the wrong entry. What am I supposed to do?
I tried to select Empty ASP.NET Web project, but It doesn't work, all the vars and methods from aspx pages are not detected in aspx.cs. Same with Web Form. I can't set up anything and the solution is not working.
Everyone at the company uses Windows and they can't help me.
What I have to do to import it in the right way?
I'd like to use VS Code if it's possible. This is the first time with asp.net.
Thanks in advance
The main thing is that ASP.NET Web Forms is obsolete. I guess they stopped to support such type of solution a long time ago, only critical crushes. If you really want to use mac for ASP.NET Web Forms you should install Parallels VM with Windows 10 and Visual Studio on board.

Debugger For Visual Studio is not Working

I am facing a very serious issue with visual studio debugger. My asp.net application is hosted on local IIS server. Yesterday i was debugging my code suddenly it stopped working. I verified w3wp process. It was same as IIS process. Then i tried to download symbols but i am not sure either they are all that i need. I tried attaching debugger on visual studio 10 and visual studio 12. Neither of them is working in this case. I tried to attach debugger of JavaScript but it is also not working.
Please Help.
Are you building full debugging symbols? If not then the debugger has no information to relate the source code to the in memory activity under the debugger. This is set in the project properties per configuration.
Also ensure the symbols are in the bin folder.
You can validate that VS is loading the right symbols with the Debug | Modules window.
I cleared temporary cache of .NET Framework. then i again deployed my application on IIS with different name and magically everything started working.

Crystal Report v10.5 toolbar not visible on Firefox but visible on IE and Chrome

I am using crystal report v10.5 with visual studio 2008 to develop crystal reports.The problem I am facing is with the toolbar which is not visible on Firefox but it is visible on IE and Chrome.
I have installed same version on both development machine and on production server which is Crystal report v10.5. My development machine is Windows 7 32bit and production is Windows 2008 64bit.
I have tried solutions mentioned on numerous forums such as
Copy the 'aspnet_client' folder from 'C:\Inetpub\wwwroot' to 'C:\Inetpub\wwwroot\your-website-name'.
create a new virtual directory in your web site and point it to "C:/Inetpub/wwwroot/aspnet_client".
Application pool is to be changed to "Classic" instead of "Integrated".
Set the application pool of your application to operate under LOCAL SERVICE permission.
But still I am not able to show toolbar on Firefox.
Configurations:
Visual Studio 2008
.Net Framework 3.5
Crystal Report for runtime 10.5
Windows Server 2008 64bit
Can anyone point me to the right direction?
Edit- I recently upgraded from Windows 2003 to Windows 2008 and the same version for CR 10.5 was working as expected without any mentioned solutions above.
Thank you
You need to add ClientTarget="uplevel" to the page directive of the aspx file.
<%# Page ClientTarget="uplevel" ... %>
It seems that there are compatibility issues between CR and certain browsers depending on the version of CR. There is a very helpful post here that has links to a compatibility table. I suggest to check that out and then see if you can maybe upgrade to a different version of CR.
Hope that helps.
My application use last Crystal Runtime on x64 server and work on firefox too.
1) If the toolbar is not visible there should be a reason (press F12 in firefox.. what do you see? 404 error? 500 error? Please post it!)
2) Crystal Reports Runtime 13.x IS available for X64 servers too.. There is no reason to use an old runtime containing many bugs resolved in other releases.
You can get it here (get MSI 64 bit - Support Pack 8)
After updating runtime you have to copy the 'aspnet_client' folder again fi you did (new virtual directory in your web site is a better approach)
After updating runtime you could need a little hack to let an application developed with older dll work with new dll. There are few rows you have to put into web.config described here.

ASP.Net Development Server performance

I am developing a simple ASP.Net application on a Windows 7 x64 machine using Visual Studio 2008 SP1. The computer itself is a very strong machine.
I am using the built in development server for debugging.
Starting the debug process takes a mindblowingly long time (~20 minutes until the first page is loaded). Sometimes the pages load immediately. I encounter this problem only with web projects, windows forms project work as expected.
What could be the cause? How can I make the development work like it worked on an XP machine?
Edit:
The web pages are normal pages, no heavy code, so this cannot be the reason.
try this fix for VS Studio 2008 http://support.microsoft.com/kb/946581
This fix was not included in Microsoft Update. It fixes slow build time and many more and is recommended for users that experience problems.
The main reason is probably because on each change of a page, there is a batch compile of a lot of files, on the same directory. To avoid the batch compile use this flag on the web.config. That way only the changed file will be compile, the one you work on it, and not others.
<compilation batch="false" ... >
Relative :
Slow Performance -- ASP .NET ASPNET_WP.EXE and CSC.EXE Running After Clicking Redirect Link

ASP.NET Development Server - Empty webResource.axd after conversion from 2.0 to 3.5

I have moved a project from asp.net 2.0 to 3.5. The original project was using the atlas ajax extensions so I have modified the code to use the built in ajax features in 3.5.
When running the project within the dev environemnt (VS2008 on Vista Business SP1) and using the asp.net dev server I receive javascript errors such as WebForm_PostBackOptions which point to a missing handler/module.
If I deploy the project and run it stand alone within IIS or if I use Fiddler2 while running in VS2008 I do not see the errors and fiddler shows that the axd files are being downloaded correctly. Also deploying to a 2003 server does not show any issues.
I could just carry on and forget this as it works when deployed but I would like to understand what is happening. Has anyone got an ideas as to what is going on here and how to get the same results accross all environments?
Do you get these same errors when you run in VS2008 but with IIS instead of the dev server?

Resources