[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Receiving Invalid Character message from web.config file when asp.net app loads

Posted on 2008-11-19
1
Medium Priority
?
1,528 Views
Last Modified: 2012-05-05
Ok, I added a new page to an existing application running on a dev server.   There is a string of special characters I added as one of the appsetting values in the web.config.  The new page reads this string and performs a function to dycrypt it to a password which it needed for other functionality.   Everything is working great in DEV.  
Today we moved the page and the web.config settings to QA.  Now there is a problem.  The app wont even load.  Getting a messsage 'There is an invalid character in the given encoding line 31 position 34.   This is the first special character in the new appsetting value.   I verified that the header of the web.config in both DEV and QA match:   <?xml version="1.0" encoding="utf-8"?>.  I also verified the special characters are the exact same on both servers.
So why would the special characters load ok on one server and not the other?  
0
Comment
Question by:smolakm
1 Comment
 

Accepted Solution

by:
smolakm earned 0 total points
ID: 22997757
THis has been resolved with a bit more investgation.   The web.config on the QA was edited with Notepad and when saved, saved in ANSI format.    I opened the web condif and did a Save As with the UTF-8 format....fixed the problem.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question