Showing posts with label prior. Show all posts
Showing posts with label prior. Show all posts

Monday, March 26, 2012

Server side-error occurred on sending debug HTTP request.

I got a new machine this week. Prior to that, I backed up my WWWROOT folder.

Now I have the new machine, moved my files back.

I have one projet, though, that refuses to debug/launch:

================================================
Error while trying to run project: Unable to start debugging on the web
server. Server side-error occurred on sending debug HTTP request.

Make sure the server is operating correctly. Verify there are no syntax
errors in web.config by doing a Debug.Start Without Debugging. You may also
want to refer to the ASP.NET and ATL Server debugging topic in the online
documentation.
================================================

According to MS, the likely cause is a bad web.config file. However, this is
the same file that worked on my last machine, and it's the exact same file
currently running on our live server just fine.

So, could there be another culprit here? Anything else I should look at?

-DarrelIs your IIS configured right... You have to config your folder as a
application folder in the IIS
"darrel" <notreal@.nowhere.com> escreveu na mensagem
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this week. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ================================================
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ================================================
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
Is it possible that you had the Web declared as an Application in IIS but
you have done that on the new machine?

Ken

Microsoft MVP [ASP.NET]

"darrel" <notreal@.nowhere.com> wrote in message
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this week. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ================================================
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ================================================
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
> Is your IIS configured right... You have to config your folder as a
> application folder in the IIS

Yea. I dunno what happened. I destroyed all my project files, made a new
project, reimported all the files (including the web.config) and things were
back to normal.

Must have been a VS.net bug.

Surprise. ;o)

-Darrel

Server side-error occurred on sending debug HTTP request.

I got a new machine this w. Prior to that, I backed up my WWWROOT folder.
Now I have the new machine, moved my files back.
I have one projet, though, that refuses to debug/launch:
========================================
========
Error while trying to run project: Unable to start debugging on the web
server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax
errors in web.config by doing a Debug.Start Without Debugging. You may also
want to refer to the ASP.NET and ATL Server debugging topic in the online
documentation.
========================================
========
According to MS, the likely cause is a bad web.config file. However, this is
the same file that worked on my last machine, and it's the exact same file
currently running on our live server just fine.
So, could there be another culprit here? Anything else I should look at?
-DarrelIs your IIS configured right... You have to config your folder as a
application folder in the IIS
"darrel" <notreal@.nowhere.com> escreveu na mensagem
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this w. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ========================================
========
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ========================================
========
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
>
Is it possible that you had the Web declared as an Application in IIS but
you have done that on the new machine?
Ken
Microsoft MVP [ASP.NET]
"darrel" <notreal@.nowhere.com> wrote in message
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this w. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ========================================
========
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ========================================
========
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
>
> Is your IIS configured right... You have to config your folder as a
> application folder in the IIS
Yea. I dunno what happened. I destroyed all my project files, made a new
project, reimported all the files (including the web.config) and things were
back to normal.
Must have been a VS.net bug.
Surprise. ;o)
-Darrel

Thursday, March 22, 2012

Server.HTMLEncode/Decode and Databinding

I am using Server.HTMLEncode on user input prior to storing it in an sql table, and of course I use Server.HTMLDecode before displaying it or presenting the data back to the user for editing. HOWEVER, when I bind the data to a dropdownlist or similar control it is not "HTML decoded" and chars like & amp ; appear. My question is: is there anyway around this other then using a for next loop (and decoding selected fields) to get the data into the dropdown list. ThanksMy question would be why would you html encode before sending to the database and decode before sending to the client?
bleroy, maybe this is his reason:

Use Server.HTMLEncode for strings stored in a database

If your ASP pages display strings stored in database fields, you should always process the strings with the Server.HTMLEncode method, otherwise the string won't be displayed correctly in the user's browser if it contains characters that have a special meaning to HTML, such as the quote ("), the less-than (<) and greater-than (>) symbols, the ampersand symbol (&), and any character whose ANSI code is larger than 127.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q253119

recommends using Server.HTMLEncode from forms and querystrings:

HOWTO: Review ASP Code for CSSI Vulnerability

This article describes how to identify and correct Active Server Pages (ASP) applications that are susceptible to Cross-Site Scripting Security Issues (CSSI). Only input that is not correctly validated or formatted makes your application vulnerable to attack.
You both are beside the point here.

Encoding before sending TO the database and decoding what comes FROM the database is absolutely useless. The database won't suffer from any javascript injections, believe me. Sql injections, perhaps, but X-site scripting, no way.

These papers explain how you should encode any data FROM THE USER TO THE PAGE.

So if you're storing user data to the database, you may encode it at this point or when fetching it back from the database, but don't DECODE what comes from the database before sending it to the client.

It's the "and of course [?] I use Server.HTMLDecode before displaying it or presenting the data back to the user for editing" from the original post that is utterly wrong.
> Encoding before sending TO the database and decoding what comes FROM the database is absolutely useless.

> These papers explain how you should encode any data FROM THE USER TO THE PAGE.

What is stored in the database (from the user) will be displayed on the page. Is is still wrong?