XML serialization deserialization not working on Windows server 2012. Error is There Is An Error In Xml Document - iis-8

I have developed program in VS2010 (.net framework 4.0) in which xml file come from database table and get deserialized using XMLSerializer using C# in asp.net.
Same code is working on production server which is Windows Server 2003, it also works on my local machine which is Windows 7.
Now i am deploying this code on different server Windows Server 2012.
When I host my application on IIS 8.0, it is giving me error ('There Is An Error In Xml Document (1,217)') for same file which I have tested on my previous server and IIS 6.0 & IIS 7.0.
But on same server (Windows Server 2012) when I test this same code by installing visual studio 2010 , it works fine.
Is there any missing file or missing settings which I should do?

I had pretty much the same problem today. Got XML deserializing errors on Server 2012, but everything worked fine on my local Windows 8 machine.
Suspected it had to do with the patch levels on the server and lo and behold, after a round with Windows Update it deserialized like a god! Have you updated your server lately?

Related

How to run ASP.Net MVC 4 application on IIS 10

I upgraded my machine to windows 10 release 2.0 from Windows 7 and installed Visual Studio 2017 which I earlier used was VS 2012. My application is not working after setting up IIS 10.
Getting this below error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Is there something extra that needs to be configured for IIS 10?
From the asker in an edit to his question:
Running Visual Studio in admin mode solved the problem.

Updating IIS website using WCF standard endpoints with Powershell

We have an ASP.Net website running under the 4.0 framework in IIS 7.5 on a Windows Server 2008 R2 box. A portion of the web site functionality utilizes WCF and has a "standardEndpoints" section in the web.config.
The website works fine and everything works fine if we want to use the IIS Management Console GUI to do things.
We would like to use powershell to make changes to the web.site but when we run "Set-WebConfigurationProperty" an error is generated indicating that the "standardEndpoints" section of the web.config can't be processed.
The hotfix referenced here is not the solution. The website works, the hotfix appears to be only for Server 2008 (not R2), and when you try to install it, it says "not applicable for this server".
We did discover by running $PSVersionTable that PowerShell was referencing version 2.0 of the CLR. We installed Powershell 3.0 and now Powershell is referencing version 4.0 of the CLR but the problem persists.
We are looking to see if there is a simple solution to this. I suspect we may not have the right version of the IIS management script dll but can't find a different one to use. If the solution gets to complicated, we will just wipe the server and start from scratch.
Thanks for any suggestions,
John

Using SQL Server CE 3.5 on Azure Cloud Service Hosting using web role

We have hosted a asp.net 4.0 application on Azure Cloud Hosting service using web role. We are using SQL Server CE 3.5 dll and inserting some data to .sdf file. Getting the following error message while opening connection to SQL Server CE .sdf file.
Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8080. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
Tried DbProviderFactories, runtime tags with in web.config still issue is same. And also tried deployable dependency option on solution as well as private installation for SQL Server Compact as suggested in this article. http://www.codeproject.com/Articles/33661/Creating-a-Private-Installation-for-SQL-Compact , still issue remain.
If I use SQL Server CE 4.0, it's working fine, it's able to insert data and return .sdf file. But with SQL Server CE 3.5 it's giving the above error, we need specifically 3.5 as we are going to send this .sdf file to mobile application through web service.
How to use SQL Server CE 3.5 on Azure cloud hosting service? Any suggestion is highly appreciated.
thanks and regards,
hari.
It could be environmental - Could you test the value of these two statements:
string envVar = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
Assembly entryAssembly = Assembly.GetEntryAssembly();
string str2 = (entryAssembly == null) ? string.Empty : Path.GetDirectoryName(entryAssembly.Location);
(This is code from the 3.5 SP2 ADO.NET provider) -
str2 should be the path to your web app bin folder
- envVar should be the folder name for the processor architecture (X86 or AMD64)
In 4.0, the logic to get the path (str2) has been improved:
string localPath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath;
Path.GetDirectoryName(localPath);
I think the logic has been improved in 4.0 to better support web deployment. In other words: Private Web Deployment with SQL Server Compact 3.5 SP2 is not supported.
Options: Use host that has 3.5 SP2 installed, use 4.0 and modify the version header of the file (have not tried this, but could be an option) See http://erikej.blogspot.dk/2010/08/how-to-upgrade-version-3x-database-file.html

Unable to install Windows Web Services API for Remote Debugging with VS2012

I'm trying to remote debug using visual studio 2012 and windows server 2008 not R2. I recieve the following error when setting up the remote debugger.
Has anyone else been able to install 2012 remote debugger on Windows server 2008 that is not R2?
This is the full error message after I hit configure remote debugging.
According to VS 2012 system requirements remote debugging is not supported on Windows Server 2008.
At this MS forum post Brad Sullivan the Program Manager for Visual Studio Debugger has posted the following:
There is a known issue in the installer for Remote Tools for Visual
Studio 2012 that is breaking remote debugging on Windows Server 2008.
While we work on this issue, you can use the following work-around:
1) If not already, please install “Platform Update for Windows
Server 2008 (KB971644)” from Window Update. It will
install KB971512, KB971513, and KB960362 in “Control Panel -> Programs
and Features -> Installed Updates”.
2) Install Windows Live Essentials from
http://go.microsoft.com/fwlink/?LinkID=255474
Following these instructions should prevent you from seeing the error
regarding Windows Web Services API.
As odd as it sounds, I can confirm this to have fixed the issue for me.

How to install iis 6.0 on windows xp-32?

well, according to what I've found googling around, it's imposible... (maybe with with windows xp 64...)
but I thought that maybe someone could find a way to achieve it, or at least some workaround...
http://www.iisanswers.com/IISFAQ.htm
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.inetserver.iis&tid=14654991-875f-4cc6-a853-7e9f3bb96bc3&cat=en&lang=en&cr=&sloc=en-us&m=1&p=1
--
ps: I need to debug classic asp code, and my production environment is windows 2003, while my development machine is windows xp...
--
edit:
just to clarify, I can already debug classic asp code in iis 5 with vs 2003 and 2008, it's just that I stumbled upon a (very silly) bug that only appeared on iis 6 (when IIS 5 received and empty http status, it just assumed 200, while iis 6 kept asking for my credentials in an infinite loop, it was very silly in deed, but took me a lot of time -and cursing- to discover it)
IIS 6 cannot be installed on Win XP. However, debugging classic ASP code is possible on Windows XP / IIS 5.1 using Visual Studio 2003 and up. You will need to configure IIS 5.1 to "enable ASP server-side debugging" (disabled by default):
IIS settings http://www.freeimagehosting.net/uploads/f1a6f781b9.png
Here is a more detailed article on how to debug classic ASP pages in Visual Studio - link
(NOTE: When running on XP Pro/IIS 5, you need to attach to dllhost.exe instead of w3wp.exe)
You posting in your 2nd link is correct. And read the faq. That spells out why it can't be done.
One option you can do is have a virtual machine of Server 2003 running on your laptop.