Google Analytics Extension…

Jun 26, 2012 at 11:00 PM
Edited Jun 26, 2012 at 11:11 PM

I downloaded the Google analytics extension from here:

http://dnbegallery.org/cms/List/Extensions/GoogleAsyncAnalytics

 

I successfully put it in my, "App_Code" folder ~extensions

when I logged into my local machine/local blog… I was able to see an extension link with the name Google analytics in that extension section of my dashboard.

I'm glad I did all of this on my local machine before going live with it.

I'm a converted Linux developer ;-)

so, bear with me when I asked…

"A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$GoogleAsyncAnalytics$trackerID="<script type="text/j").

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. To allow pages to override application request validation settings, set the requestValidationMode attribute in the httpRuntime configuration section to requestValidationMode="2.0". Example: <httpRuntime requestValidationMode="2.0" />. After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the <pages> configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. For more information, see http://go.microsoft.com/fwlink/?LinkId=153133. 

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$GoogleAsyncAnalytics$trackerID="<script type="text/j")."

 

I see something about stack trace, if you need that… I can post that also.

 

Thank you in advance to anyone who listens.

Rob

Jul 2, 2012 at 9:41 PM

By default asp.net doesn't allow anything that can be construed as markup or script in control values.  This can be turned off and In many instances there is no really danger.  If that's the case you can add the following page directive: 

<%@ Page ... ValidateRequest="false"%>

If you are using .NET 4 then you will need to add requestValidationMode="2.0" to the httpRuntime configuration section of the web.config file. For example:

<httpRuntime requestValidationMode="2.0"/>

Jul 5, 2012 at 10:26 AM
alex_brambila wrote:

By default asp.net doesn't allow anything that can be construed as markup or script in control values.  This can be turned off and In many instances there is no really danger.  If that's the case you can add the following page directive: 

<%@ Page ... ValidateRequest="false"%>

If you are using .NET 4 then you will need to add requestValidationMode="2.0" to the httpRuntime configuration section of the web.config file. For example:

<httpRuntime requestValidationMode="2.0"/>

Ah, good stuff…

 

I ended up deleting the extension & found a section where I could insert the Google analytics code… So far, it seems to be working…

 

I was looking through some of the folders and files… A lot of the files seem to be written in XML.

How would I go about adding a "div", so I could insert Google AdSense? I would like it to float in the upper right-hand corner of every post.

 

Thank you in advance