Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, January 25, 2010 10:55 PM
My application is full of two warning messages:
Unrecognized namespace 'asp'
Unrecognized tag prefix or device filter 'asp'
It's almost as if Visual Web Developer 2008 does not recognize asp
I have read some previous post about opening a master page, but I don't have a master page setup, and am not planning on setting one up at this point.
Is there anything that I need to set with my web.config file or any other settings that I am missing?
Thank you for any feedback.
All replies (16)
Wednesday, February 3, 2010 10:59 PM âś…Answered
OK, I have tried several things....I have created a simple master page based on the link that you gave me to the other post. When I did that, I was able to get rid of all of the warnings that said:
Unrecognized namespace 'asp'
Unrecognized tag prefix or device filter 'asp'
However, all of my directives are color coded, then everything turns to black after my opening script tag.
Here is what I currently have as my master page:
<%@ Master Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head></head>
<body>
<asp:ContentPlaceHolder ID="CPH1" runat="server">
</asp:ContentPlaceHolder>
</body>
</html>
Here are the first 14 lines in my .aspx file (yes, my files are .aspx pages) the first 11 lines show up color coded in yellow, blue, red and brown...
<%@ Page MasterPageFile="~/Master.master" Language="VB" %>
<%@ Register TagPrefix="dotnetCHARTING" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Odbc" %>
<%@ import Namespace="System.Drawing" %>
<%@ import Namespace="System.IO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH1" runat="server">
<script runat="server">
Dim intbeg1, intbeg2, intbeg3, intbeg4, intbeg5, intbeg6, intbeg7, intbeg8, intbeg9, intbeg10 as string
Dim intendage, intend1, intend2, intend3, intend4, intend5, intend6, intend7, intend8, intend9, intend10, intportendval As String
Beginning with where I declare my variables (lines 13 and 14) they along with all of the other content after my opening script tag is in black and is not color coded.
I am receiving a warning message about my script tag that says:
"Validation (XHTML 1.0 Transitional): Element 'script' is missing required attribute 'type'"
and
"Validation (XHTML 1.0 Transitional): Element 'script' is missing its closing tag."
I do have a closing script tag, so I don't understand that, and I'm not sure what is meant by the attribute type comment.
In fact, for my closing script tag, I'm receiving a warning that says:
"This end tag has no matching start tag."
So, I don't understand what that's all about.
I have tried closing and re-starting Visual Web Developer multiple times, but it doesn't do any good.
Also, here is my current web.config content. It is the same content I was told to include the other day.....(I have the astrix in the connection string for privacy reasons)
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="MySQL_ODBC" connectionString="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=******; DATABASE=******; UID=*****; port=*****; OPTION=*****" providerName="System.Data.Odbc" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Above, you had mentioned creating a new project and then building it, but I'm not sure what that is, or how to do it?
I really appreciate all of your patience and help with trying to help me resolve all of this.
Thank you very much for your time.
Ryan
Tuesday, January 26, 2010 1:54 AM
Do you have these lines in the webconfig? :
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
Tuesday, January 26, 2010 10:35 PM
I tried copying the lines that you show above into my web config file, but I get the following warning:
ASP.NET runtime error: Unrecognized configuration section pages. ~\web.config line 15
I didn't think you could put a page or control tag in your web config file.
I'm not very experienced with setting up a web config file.
I use to have ASP.net web matrix and everything worked fine. Web Matrix wouldn't work with Windows 7, so I had to get Visual Web Developer 2008 Express Edition.
I also get a number of warnings that say:
The class or CssClass value is not defined.
The web pages still run fine, but when I view the source code I have all of these warnings and messages, and things are not color coded.
Also, once I get the correct lines in my web config file will I need to include some declarations in my web page such as:
<%@ import Namespace="System.Web.UI" %>
<%@ import Namespace="System.Web.UI.WebControls" %>
Also, what does the PublicKeyToken do?
I appreciate all of your help.
Wednesday, January 27, 2010 2:16 AM
I tried copying the lines that you show above into my web config file, but I get the following warning:
ASP.NET runtime error: Unrecognized configuration section pages. ~\web.config line 15
Did you added the lines within <system.web> section? you must add them there.
I also get a number of warnings that say:
The class or CssClass value is not defined.
That means you are using css classes that either not existed or you didn't add a reference to your css file(if you are implementing the css classes in a css file) but it's not a big issue if you are adding them at run-time i.e. setting the theme at server side, if you run your page and it's working fine and with there design then it's not a big issue at all.
The web pages still run fine, but when I view the source code I have all of these warnings and messages, and things are not color coded.
There are many types of warnings and messages that appear in the source code,may be you are not implementing using the standards of XHTML,for example if you are using object tag with params,each param must be closed like this /> , if you are closing it without the backslash like this > then a warning appears that the param is not closed well, but the object will continue to work fine without issues,anyway I find them annoying and I make sure to solve all of these warnings till all disappear.
Also, once I get the correct lines in my web config file will I need to include some declarations in my web page such as:
<%@ import Namespace="System.Web.UI" %>
<%@ import Namespace="System.Web.UI.WebControls" %>
No you don't need them at all.
what does the PublicKeyToken do?
Each dll/assembly you want to have it in the GAC (Global Assembly Cache) must be strongly named,signed with a private key,now the public key token is a 64-bit hash of the public key which corresponds to the private key used to sign the assembly. It's used to make an assembly name unique, so two strongly named assemblies can have the same filename, but .NET will treat them as different assemblies.
To have a good look on this,go to the windows folder then go to the assembly folder,you will see a lot of assemblies registered there,and you will notice that dlls like System.Web and others are there too and notice the public token key column,the public key token in the webconfig must match the one in the assembly folder but you don't have to worry about that since the public key token for the dlls of the .Net framework is the same for any computer in the world (if they have the same version of .Net framework).
To know more take a look at this link:
Anyway,I have VS2008 and these line I told you about are automatically added to the webconfig (I didn't add them manually) but they must be added.
Wednesday, January 27, 2010 9:34 PM
I copied the lines that you described in my web.config file. Here are the contents of my web.config file excluding the application settings that I have in them:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</system.web>
</configuration>
After doing this and saving the file I am still getting the warning messages that say:
Unrecognized Namespace 'asp'
Unrecognized tag prefix or device filter 'asp'
Here are the directives that I have at the beginning of my .aspx file:
<%@ Page CompilerOptions='/R:"C:\Program Files\Microsoft.Net\Odbc.Net\Microsoft.data.odbc.dll"' Language="VB" Debug="true" %>
<%@ Register TagPrefix="dotnetCHARTING" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Odbc" %>
<%@ import Namespace="System.Drawing" %>
<%@ import Namespace="System.IO" %>
Am I missing anything? Is there something I'm doing wrong?
I really appreciate your help.
Thank you very much.
Wednesday, January 27, 2010 9:50 PM
Also, I seem to now be getting this error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section system.web/add.
Source Error:
|
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
Notice the version information above? It says version 2.0? Why wouldn't it be version 3.5?
I appreciate your help.
Thursday, January 28, 2010 10:08 PM
Hi,
Also, I seem to now be getting this error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section system.web/add.
Source Error:
|
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
Notice the version information above? It says version 2.0? Why wouldn't it be version 3.5?
I appreciate your help.
If we create a simple test ASP.NET website, does it have the same issue? The "tagPrefix="asp"" should be declared in the Controls section in web.config file. In the code you posted above, it is in the customErrors section which is wrong.
When we create a new ASP.NET website using .Net Framework 3.5 as target, its web.config should look like as follow:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I look forward to receiving your test results.
Tuesday, February 2, 2010 11:06 PM
I appreciate the help, and I apologize for not responding earlier. I have not had access to my pc for several days.
I took the code that you displayed above for the web.config file and copied it into my web.config file and tried to run my web page in visual web developer 2008 express edition again. I am still getting all of the same unrecognized namespace 'asp' warnings. I have tried this also in a more simplistic .aspx page and am still getting the same errors.
I had to change one thing in your web.config file, and I'm not sure if it had any impact, but line 72 above had this line of code:
<em> </pages></em>
that gave a configuration error. I just took out the em tags and I was able to run my web pages.
I would really like to get this figured out. I don't like operating with the 600 plus warnings I'm getting.
One of the warnings I am receiving now says: 'Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollection' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'.
I don't know if I received that warning for putting a connection string in my web.config file.
I have these lines under your line 25 in the web.config file
<appSettings>
<add key="ConnectionString" value="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=********; DATABASE=*******; UID=******; port=******; OPTION=**" />
</appSettings>
<connectionStrings/>
Any place I have the * character I used to replace my confidential information.
I really appreciate all of your help.
Thank you
Wednesday, February 3, 2010 4:05 AM
I had to change one thing in your web.config file, and I'm not sure if it had any impact, but line 72 above had this line of code:
<em> </pages></em>
it's a type,remove the em tags to be like this: </pages>
One of the warnings I am receiving now says: 'Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollection' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'.
You are using ConfigurationSettings which is obsolete,replace it with ConfigurationManager,but first you need to add a reference to System.Configuration.dll
I have these lines under your line 25 in the web.config file
<appSettings>
<add key="ConnectionString" value="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=********; DATABASE=*******; UID=******; port=******; OPTION=**" />
</appSettings>
<connectionStrings/>
Why do you add the connection string like this?and in the AppSettings ?!!
the whole section must be changed to this:
<appSettings/>
<connectionStrings>
<add name="MySQL_ODBC"
connectionString="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=********; DATABASE=*******; UID=******; port=******; OPTION=**;"
providerName="System.Data.Odbc" />
</connectionStrings>
of course you can change the name to anything else other than MySQL_ODBC,but to access it you need to change your code to this:
string connectionString = ConfigurationManager.ConnectionStrings["MySQL_ODBC"].ConnectionString;
Anyway,what is important is to remove the em tag I mentioned earlier then let us know the results.
Wednesday, February 3, 2010 8:48 AM
Thank you for the reply. I appreciate the help.
This did correct my problem with the connection string, but I am still receiving all of the warnings on the unrecognized namespace 'asp'
Any ideas?
FYI...I did reinstall visual web developer 2008, but it did not do anything to get rid of the warning messages.
Thank you
Wednesday, February 3, 2010 9:20 AM
Please take a look at this link:
http://forums.asp.net/p/945278/1283285.aspx
if the link didn't help,then please check that all the pages are aspx page (not html).
If all of them are aspx page,then create a new project then build it,if the new project you created is fine then copy the webconfig of that project into the webconfig of your project.
If non of the above helped,then post the webconfig.
Thursday, February 4, 2010 4:50 AM
.I have created a simple master page based on the link that you gave me to the other post. When I did that, I was able to get rid of all of the warnings that said:
Unrecognized namespace 'asp'
Unrecognized tag prefix or device filter 'asp'
Now things are going well..right?
I am receiving a warning message about my script tag that says:
"Validation (XHTML 1.0 Transitional): Element 'script' is missing required attribute 'type'"
and
"Validation (XHTML 1.0 Transitional): Element 'script' is missing its closing tag."
I do have a closing script tag, so I don't understand that, and I'm not sure what is meant by the attribute type comment.
In fact, for my closing script tag, I'm receiving a warning that says:
"This end tag has no matching start tag."
So, I don't understand what that's all about.
You are writing code,a vb code actually,so when you want to write a vb code inside a script tag,it must be like this:
<script type="text/VB" runat="server"></script>
the start tag is:<script type="text/VB" runat="server">
then write your code,once you finish then close the tag with this:
</script>
so in your case,you need to fix the start tag you used (add the type attribute),and after adding all vb code,you need to close the tag by adding: </script> that's it.
Above, you had mentioned creating a new project and then building it, but I'm not sure what that is, or how to do it?
I see things are going well,so forget creating a new project and just fix the script tags I mentioned earlier and I'm sure things will go fine
I really appreciate all of your patience and help with trying to help me resolve all of this.
You welcome,I'm glad to help
Thursday, February 4, 2010 8:40 AM
Thank you for your help.
I changed my script tag to what you had described:
<script type="text/VB" runat="server"></script>
All code underneath is still completely black. There are no formatting color codes at all.
Any ideas?
Thank you
Thursday, February 4, 2010 9:17 AM
Does the page run??
if not,then can the page run if you remove the script you added?
Thursday, February 4, 2010 9:37 AM
yes, the web page will still run regardless if I have the script tag as
<script type="text/VB" runat="server"></script>
or
<script runat="server"></script>
In fact, when I use this script tag:
<script type="text/VB" runat="server"></script>
everything turns to black. When I used my original script tage, I would say that the majority of items were in black, but there were sporadic lines that showed color coding and formatting, but not the color coding and formatting that should be present.
I would just really like to be able to view everything in the color coded format.
This gets back to the original issue....I was always able to run the web page and it worked just fine, I just want to be able to see everything in its correct color code format for easier use (along with getting rid of the warning messages, which you already helped me out with)
Any ideas?
I really appreciate all of the help. Thanks again.
Thursday, February 4, 2010 9:19 PM
SUCCESS!
First off, thank you so much for all of your help with all of the issues. It seems like I have cleaned up a lot of out dated items on my .aspx pages. Thanks for all the advice.
I figured out what was turning all of the source code to all black.....I did some troubleshooting and figured out that it was the dotnetcharting application that I am using. I use asp dotnetcharting for graphs and pie charts, and whatever is in it is causing my font to not get color coded. I have been using it for a while, so maybe the current code that I am using with it is just outdated?
Anyways, that's an issue for me to figure out with that company and it appears that VWD 2008 express is working just fine now.
The original issue with the unrecognized namespace 'asp' has been corrected per the earlier posts, and now I'm jus going to work on whatever it is to correct this.
Thanks again!