Saturday, March 24, 2012
The data at the root level is invalid. Line 1, position 1
I got this message ("The data at the root level is invalid. Line 1, position
1.") when I moved the application from my workstation to Windows 2003 web
server. But the wired thing the whole application works fine on my
workstation which running Windows XP prof sp 2 edition.
Please help me out
Thanks
AlanOn Fri, 05 Aug 2005 12:24:33 -0400, Alan Wang wrote:
> Hi there,
> I got this message ("The data at the root level is invalid. Line 1, positi
on
> 1.") when I moved the application from my workstation to Windows 2003 web
> server. But the wired thing the whole application works fine on my
> workstation which running Windows XP prof sp 2 edition.
> Please help me out
> Thanks
> Alan
If ds is your DataSet, you can refer to the tables by name as in
ds.Tables("yourTableName")
The data at the root level is invalid. Line 1, position 1
I got this message ("The data at the root level is invalid. Line 1, position
1.") when I moved the application from my workstation to Windows 2003 web
server. But the wired thing the whole application works fine on my
workstation which running Windows xp prof sp 2 edition.
Please help me out
Thanks
AlanOn Fri, 05 Aug 2005 12:24:33 -0400, Alan Wang wrote:
> Hi there,
> I got this message ("The data at the root level is invalid. Line 1, position
> 1.") when I moved the application from my workstation to Windows 2003 web
> server. But the wired thing the whole application works fine on my
> workstation which running Windows xp prof sp 2 edition.
> Please help me out
> Thanks
> Alan
If ds is your DataSet, you can refer to the tables by name as in
ds.Tables("yourTableName")
The data is invalid - windows media player error
the following code.
I need to be able to use either response.outpustream or
response.binarywrite since
I will be getting the file from an sql server image field. Other types
of files such as gif or pdf work fine. Here is the code for the wmv:
Dim sql As String
sql = "select * from TblBlobs where blob_id = " & iBlobId
Dim da As New SqlDataAdapter(sql, cn)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
cn.Open()
da.Fill(ds, "Default")
Dim myRow As DataRow
myRow = ds.Tables("Default").Rows(0)
Dim MyData() As Byte
MyData = myRow("filedata")
Response.ClearContent()
Response.ClearHeaders()
Response.Buffer = False
Response.ContentType = "video/x-ms-wmv"
Response.OutputStream.Write(MyData, 0, MyData.Length)
Response.Flush()
Response.Close()
MyCB = Nothing
ds = Nothing
da = Nothing
cn.Close()
cn = Nothing
When the user clicks on a button to run this code, the error "The data
is invalid" is displayed from windows media player. I cannot figure
out what is specific about wmv's that they will not stream.
Thanks Before Hand,
AdielUpdate:
The error when testing on system with Windows Media Player Version
7.10.00.3077 is "The data is invalid"
The error when testing on system with Windows Media Player Version
10.00.00.3700 is "Windows Media Player cannot play the file. The
Player might not support the file type or might not support the codec
that was used to compress the file." and if you click on "More
Information", the error is "C00D1199: Cannot play the file" Error ID =
0xC00D1199, Condition ID = 0x00000000.
Thanks,
Adiel
The data is invalid - windows media player error
the following code.
I need to be able to use either response.outpustream or
response.binarywrite since
I will be getting the file from an sql server image field. Other types
of files such as gif or pdf work fine. Here is the code for the wmv:
Dim sql As String
sql = "select * from TblBlobs where blob_id = " & iBlobId
Dim da As New SqlDataAdapter(sql, cn)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
cn.Open()
da.Fill(ds, "Default")
Dim myRow As DataRow
myRow = ds.Tables("Default").Rows(0)
Dim MyData() As Byte
MyData = myRow("filedata")
Response.ClearContent()
Response.ClearHeaders()
Response.Buffer = False
Response.ContentType = "video/x-ms-wmv"
Response.OutputStream.Write(MyData, 0, MyData.Length)
Response.Flush()
Response.Close()
MyCB = Nothing
ds = Nothing
da = Nothing
cn.Close()
cn = Nothing
When the user clicks on a button to run this code, the error "The data
is invalid" is displayed from windows media player. I cannot figure
out what is specific about wmv's that they will not stream.
Thanks Before Hand,
AdielCAn you scesfully download the WMV file.
"adiel_g@dotnet.itags.org.hotmail.com" wrote:
> I cannot seem to get a wmv file to stream from asp.net. I have tried
> the following code.
> I need to be able to use either response.outpustream or
> response.binarywrite since
> I will be getting the file from an sql server image field. Other types
> of files such as gif or pdf work fine. Here is the code for the wmv:
>
> Dim sql As String
> sql = "select * from TblBlobs where blob_id = " & iBlobId
> Dim da As New SqlDataAdapter(sql, cn)
> Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
> Dim ds As New DataSet
> cn.Open()
> da.Fill(ds, "Default")
> Dim myRow As DataRow
> myRow = ds.Tables("Default").Rows(0)
> Dim MyData() As Byte
> MyData = myRow("filedata")
> Response.ClearContent()
> Response.ClearHeaders()
> Response.Buffer = False
> Response.ContentType = "video/x-ms-wmv"
> Response.OutputStream.Write(MyData, 0, MyData.Length)
> Response.Flush()
> Response.Close()
> MyCB = Nothing
> ds = Nothing
> da = Nothing
> cn.Close()
> cn = Nothing
>
> When the user clicks on a button to run this code, the error "The data
> is invalid" is displayed from windows media player. I cannot figure
> out what is specific about wmv's that they will not stream.
> Thanks Before Hand,
> Adiel
>
No, if I click on the link and choose "Save target as", the error is:
Internet Explorer cannot down from ... _ctl18$lnkLoadImageItem','').
I can understand the above error because the system has to call the
function before it can actually download the file. Basically the
function above is being called from a LinkButton. I have also tried
calling the function from a regular button and same results: I can load
gifs, pdfs, jpgs, etc but windows video files (wmv) receive the error
"The data is invalid" when the system starts Windows Media Player.
Update:
The error when testing on system with Windows Media Player Version
7.10.00.3077 is "The data is invalid"
The error when testing on system with Windows Media Player Version
10.00.00.3700 is "Windows Media Player cannot play the file. The
Player might not support the file type or might not support the codec
that was used to compress the file." and if you click on "More
Information", the error is "C00D1199: Cannot play the file" Error ID =
0xC00D1199, Condition ID = 0x00000000.
Thanks,
Adiel
The directory name is invalid
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?
Cheers
Al
"jhcorey@.yahoo.com" wrote:
> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>
The directory name is invalid
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?
Cheers
Al
"jhcorey@.yahoo.com" wrote:
> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>
The element 'compilation' has invalid child element 'compilers'.
I am methodically seeing the error below:
The element 'compilation' has invalid child element 'compilers'. List of
possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
expressionBuilders'.
Here's what the web config looks like. The error doesn't cause any issues
and according to the MSDN documentation this is valid. So why is VS2005
giving me this bogus error?
<configuration>
<system.web>
<httpRuntime maxRequestLength="8192"/>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to insert debugging symbols (.pdb
information)
into the compiled page. Because this creates a larger file that
executes
more slowly, you should set this value to true only when debugging
and to
false at all other times. For more information, refer to the
documentation about
debugging ASP.NET files.
-->
<compilation defaultLanguage="vb" debug="true" batch="false">
<compilers>
<compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
/imports:Microsoft.VisualBasic,System,System.Collections,System.Configuratio
n,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCont
rols,System.Web.UI.WebControls"/></compilers>
<assemblies>
etc, etc,In 2.0, the <compilers> section is found in machine.config,
so you don't need to place it in web.config.
Check out machine.config.comments in the .Net Framework\config dir.
The syntax has changed.
It's now in the <system.codedom> section.
See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Robert" <robertv@.noemail.nospam> wrote in message
news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
>I have a number of web projects converted from 1.1 to 2.0 in VS2005.
> I am methodically seeing the error below:
> The element 'compilation' has invalid child element 'compilers'. List of
> possible elements expected: 'assemblies, buildProviders, codeSubDirectorie
s,
> expressionBuilders'.
> Here's what the web config looks like. The error doesn't cause any issues
> and according to the MSDN documentation this is valid. So why is VS2005
> giving me this bogus error?
> <configuration>
> <system.web>
> <httpRuntime maxRequestLength="8192"/>
> <!-- DYNAMIC DEBUG COMPILATION
> Set compilation debug="true" to insert debugging symbols (.pdb
> information)
> into the compiled page. Because this creates a larger file that
> executes
> more slowly, you should set this value to true only when debuggin
g
> and to
> false at all other times. For more information, refer to the
> documentation about
> debugging ASP.NET files.
> -->
> <compilation defaultLanguage="vb" debug="true" batch="false">
> <compilers>
> <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
> System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
> extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
> /imports:Microsoft.VisualBasic,System,System.Collections,System.Configurat
ion,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCo
ntrols,System.Web.UI.WebControls"/></compilers>
> <assemblies>
> etc, etc,
>
The element compilation has invalid child element compilers.
I am methodically seeing the error below:
The element 'compilation' has invalid child element 'compilers'. List of
possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
expressionBuilders'.
Here's what the web config looks like. The error doesn't cause any issues
and according to the MSDN documentation this is valid. So why is VS2005
giving me this bogus error?
<configuration>
<system.web>
<httpRuntime maxRequestLength="8192"/>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to insert debugging symbols (.pdb
information)
into the compiled page. Because this creates a larger file that
executes
more slowly, you should set this value to true only when debugging
and to
false at all other times. For more information, refer to the
documentation about
debugging ASP.NET files.
-->
<compilation defaultLanguage="vb" debug="true" batch="false">
<compilers>
<compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Configuration,System.Data,System.Draw ing,System.Web,System.Web.UI,System.Web.UI.HtmlCon trols,System.Web.UI.WebControls"/></compilers>
<assemblies
etc, etc,In 2.0, the <compilers> section is found in machine.config,
so you don't need to place it in web.config.
Check out machine.config.comments in the .Net Framework\config dir.
The syntax has changed.
It's now in the <system.codedom> section.
See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Robert" <robertv@.noemail.nospam> wrote in message
news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
>I have a number of web projects converted from 1.1 to 2.0 in VS2005.
> I am methodically seeing the error below:
> The element 'compilation' has invalid child element 'compilers'. List of
> possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
> expressionBuilders'.
> Here's what the web config looks like. The error doesn't cause any issues
> and according to the MSDN documentation this is valid. So why is VS2005
> giving me this bogus error?
> <configuration>
> <system.web>
> <httpRuntime maxRequestLength="8192"/>
> <!-- DYNAMIC DEBUG COMPILATION
> Set compilation debug="true" to insert debugging symbols (.pdb
> information)
> into the compiled page. Because this creates a larger file that
> executes
> more slowly, you should set this value to true only when debugging
> and to
> false at all other times. For more information, refer to the
> documentation about
> debugging ASP.NET files.
> -->
> <compilation defaultLanguage="vb" debug="true" batch="false">
> <compilers>
> <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
> System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
> extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
> /imports:Microsoft.VisualBasic,System,System.Collec tions,System.Configuration,System.Data,System.Draw ing,System.Web,System.Web.UI,System.Web.UI.HtmlCon trols,System.Web.UI.WebControls"/></compilers>
> <assemblies>
> etc, etc,
Thanks for the response.
I removed it entirely from web.config as it is apparently unnecessary.
Guess I wish the migration wizard could of either 1) removed it for me or 2)
flagged it as a todo with an explanation.
Thx.
R-
"Juan T. Llibre" wrote:
> In 2.0, the <compilers> section is found in machine.config,
> so you don't need to place it in web.config.
> Check out machine.config.comments in the .Net Framework\config dir.
> The syntax has changed.
> It's now in the <system.codedom> section.
> See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
> ======================================
> "Robert" <robertv@.noemail.nospam> wrote in message
> news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
> >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
> > I am methodically seeing the error below:
> > The element 'compilation' has invalid child element 'compilers'. List of
> > possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
> > expressionBuilders'.
> > Here's what the web config looks like. The error doesn't cause any issues
> > and according to the MSDN documentation this is valid. So why is VS2005
> > giving me this bogus error?
> > <configuration>
> > <system.web>
> > <httpRuntime maxRequestLength="8192"/>
> > <!-- DYNAMIC DEBUG COMPILATION
> > Set compilation debug="true" to insert debugging symbols (.pdb
> > information)
> > into the compiled page. Because this creates a larger file that
> > executes
> > more slowly, you should set this value to true only when debugging
> > and to
> > false at all other times. For more information, refer to the
> > documentation about
> > debugging ASP.NET files.
> > -->
> > <compilation defaultLanguage="vb" debug="true" batch="false">
> > <compilers>
> > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
> > System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
> > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
> > /imports:Microsoft.VisualBasic,System,System.Collec tions,System.Configuration,System.Data,System.Draw ing,System.Web,System.Web.UI,System.Web.UI.HtmlCon trols,System.Web.UI.WebControls"/></compilers>
> > <assemblies>
> > etc, etc,
>
Hi Robert,
Yes, what a pity that the migration wizard was not able to automatically
correct this, maybe it is due to the <system.codedom> is outside the
<system.web> that beyond the migration checking. Anyway, the error message
make some sense, also thanks for Juan's informative suggestion.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
-------
| Thread-Topic: The element 'compilation' has invalid child element
'compilers
| thread-index: AcXpe7dhGIAffoz4SzOtjdSjQDOyUA==
| X-WBNR-Posting-Host: 67.180.214.235
| From: =?Utf-8?B?Um9iZXJ0?= <robertv@.noemail.nospam>
| References: <9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com>
<ewe5xmX6FHA.3924@.TK2MSFTNGP10.phx.gbl>
| Subject: Re: The element 'compilation' has invalid child element
'compilers
| Date: Mon, 14 Nov 2005 16:30:01 -0800
| Lines: 72
| Message-ID: <0A4CC52E-0180-414A-9D4D-DAF5F94820F1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 8bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358118
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks for the response.
|
| I removed it entirely from web.config as it is apparently unnecessary.
|
| Guess I wish the migration wizard could of either 1) removed it for me or
2)
| flagged it as a todo with an explanation.
|
| Thx.
| R-
|
| "Juan T. Llibre" wrote:
|
| > In 2.0, the <compilers> section is found in machine.config,
| > so you don't need to place it in web.config.
| >
| > Check out machine.config.comments in the .Net Framework\config dir.
| >
| > The syntax has changed.
| > It's now in the <system.codedom> section.
| >
| > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
| >
| >
| >
| >
| > Juan T. Llibre, ASP.NET MVP
| > ASP.NET FAQ : http://asp.net.do/faq/
| > ASPNETFAQ.COM : http://www.aspnetfaq.com/
| > Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
| > ======================================
| > "Robert" <robertv@.noemail.nospam> wrote in message
| > news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
| > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
| | > > I am methodically seeing the error below:
| | > > The element 'compilation' has invalid child element 'compilers'.
List of
| > > possible elements expected: 'assemblies, buildProviders,
codeSubDirectories,
| > > expressionBuilders'.
| | > > Here's what the web config looks like. The error doesn't cause any
issues
| > > and according to the MSDN documentation this is valid. So why is
VS2005
| > > giving me this bogus error?
| | > > <configuration>
| > > <system.web>
| > > <httpRuntime maxRequestLength="8192"/>
| > > <!-- DYNAMIC DEBUG COMPILATION
| > > Set compilation debug="true" to insert debugging symbols
(.pdb
| > > information)
| > > into the compiled page. Because this creates a larger file
that
| > > executes
| > > more slowly, you should set this value to true only when
debugging
| > > and to
| > > false at all other times. For more information, refer to the
| > > documentation about
| > > debugging ASP.NET files.
| > > -->
| > > <compilation defaultLanguage="vb" debug="true" batch="false">
| > > <compilers>
| > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
| > > System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"
| > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
| /imports:Microsoft.VisualBasic,System,System.Collec tions,System.Configuratio
n,System.Data,System.Drawing,System.Web,System.Web .UI,System.Web.UI.HtmlCont
rols,System.Web.UI.WebControls"/></compilers>
| > > <assemblies>
| | > > etc, etc,
| | | >
| >
| >
|
The element 'compilation' has invalid child element 'compilers
I removed it entirely from web.config as it is apparently unnecessary.
Guess I wish the migration wizard could of either 1) removed it for me or 2)
flagged it as a todo with an explanation.
Thx.
R-
"Juan T. Llibre" wrote:
> In 2.0, the <compilers> section is found in machine.config,
> so you don't need to place it in web.config.
> Check out machine.config.comments in the .Net Framework\config dir.
> The syntax has changed.
> It's now in the <system.codedom> section.
> See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
> ======================================
> "Robert" <robertv@dotnet.itags.org.noemail.nospam> wrote in message
> news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@dotnet.itags.org.microsoft.com...
>
>Hi Robert,
Yes, what a pity that the migration wizard was not able to automatically
correct this, maybe it is due to the <system.codedom> is outside the
<system.web> that beyond the migration checking. Anyway, the error message
make some sense, also thanks for Juan's informative suggestion.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
| Thread-Topic: The element 'compilation' has invalid child element
'compilers
| thread-index: AcXpe7dhGIAffoz4SzOtjdSjQDOyUA==
| X-WBNR-Posting-Host: 67.180.214.235
| From: examnotes <robertv@.noemail.nospam>
| References: <9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com>
<ewe5xmX6FHA.3924@.TK2MSFTNGP10.phx.gbl>
| Subject: Re: The element 'compilation' has invalid child element
'compilers
| Date: Mon, 14 Nov 2005 16:30:01 -0800
| Lines: 72
| Message-ID: <0A4CC52E-0180-414A-9D4D-DAF5F94820F1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 8bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358118
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks for the response.
|
| I removed it entirely from web.config as it is apparently unnecessary.
|
| Guess I wish the migration wizard could of either 1) removed it for me or
2)
| flagged it as a todo with an explanation.
|
| Thx.
| R-
|
| "Juan T. Llibre" wrote:
|
| > In 2.0, the <compilers> section is found in machine.config,
| > so you don't need to place it in web.config.
| >
| > Check out machine.config.comments in the .Net Framework\config dir.
| >
| > The syntax has changed.
| > It's now in the <system.codedom> section.
| >
| > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
| >
| >
| >
| >
| > Juan T. Llibre, ASP.NET MVP
| > ASP.NET FAQ : http://asp.net.do/faq/
| > ASPNETFAQ.COM : http://www.aspnetfaq.com/
| > Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
| > ======================================
| > "Robert" <robertv@.noemail.nospam> wrote in message
| > news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
| > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
| > >
| > > I am methodically seeing the error below:
| > >
| > > The element 'compilation' has invalid child element 'compilers'.
List of
| > > possible elements expected: 'assemblies, buildProviders,
codeSubDirectories,
| > > expressionBuilders'.
| > >
| > > Here's what the web config looks like. The error doesn't cause any
issues
| > > and according to the MSDN documentation this is valid. So why is
VS2005
| > > giving me this bogus error?
| > >
| > > <configuration>
| > > <system.web>
| > > <httpRuntime maxRequestLength="8192"/>
| > > <!-- DYNAMIC DEBUG COMPILATION
| > > Set compilation debug="true" to insert debugging symbols
(.pdb
| > > information)
| > > into the compiled page. Because this creates a larger file
that
| > > executes
| > > more slowly, you should set this value to true only when
debugging
| > > and to
| > > false at all other times. For more information, refer to the
| > > documentation about
| > > debugging ASP.NET files.
| > > -->
| > > <compilation defaultLanguage="vb" debug="true" batch="false">
| > > <compilers>
| > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
| > > System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"
| > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
| > >
/imports:Microsoft.VisualBasic,System,System.Collections,System.Configuratio
n,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCont
rols,System.Web.UI.WebControls"/></compilers>
| > > <assemblies>
| > >
| > > etc, etc,
| > >
| > >
| >
| >
| >
|
Thursday, March 22, 2012
The format of the file Microsoft.Practices.EnterpriseLibrary.Data is invalid
server. I installed and recompiled the
'Microsoft.Practices.EnterpriseLibrary - June 2005" then added these
assemblies to the development machine's Assembly Cache. The assemblies
version appears to be 1.1.0.0. I changed the project reference to the
newly compiled EnterpriseLibrary DLLs. The Web.Config of my
application root, I also have the following <configSections>. I don't
know why at runtime it is still asking for
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0. Please
help. Thanks.
======================== My Web.Config (partial)
==========================
<configSections>
<section name="enterpriselibrary.configurationSettings"
type="Microsoft.Practices.EnterpriseLibrary.Configuratio n.ConfigurationManagerSectionHandler,
Microsoft.Practices.EnterpriseLibrary.Configuratio n,
Version=1.1.0.0,
Culture=neutral,
PublicKeyToken=60c24972b7c20af7" />
</configSections
<enterpriselibrary.configurationSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="DMS_ASPX"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData"
name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData"
name="XML File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData"
name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings
========================= Runtime Error =========================
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: The format of the
file 'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary
ASP.NET Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs Line: 0
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Data'
could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
(Fully-specified)
LOG: Appbase = file:///C:/Inetpub/DMS_Net
LOG: Initial PrivatePath = bin
Calling assembly : DMS_ASPX, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(c:\windows\microsoft.net\framework\v1.1.4322\aspn et.config).
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\confi g\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///C:/Inetpub/DMS_Net/bin/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
Stack Trace:
[BadImageFormatException: The format of the file
'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.]
DMS_ASPX.Helper.DataBroker..ctor() +0
DMS_ASPX.form.main..ctor() +53
ASP.main_aspx..ctor() in
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET
Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) +164
[HttpException (0x80004005): Failed to create page of type
'ASP.main_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) +341
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context,
String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
+95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173
------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300Ok. I solved this problem myself. It turns out that the Enterprise
Library Configuration utility created two .config files in the
application root:
web.config
dataconfiguration.config
I changed the reference version in both of the config file to the
correct version.
Ok. I solved this problem myself. It turns out that the Enterprise
Library Configuration utility created two .config files in the
application root:
web.config
dataconfiguration.config
I changed the reference version in both of the config file to the
correct version.
The handle is invalid
I`m stucked with this problem and I don`t know what to do ((
When using CopyFromScreen () function in my Asp.Net application, I reseeve
this error message - "The handle is invalid"
The strange thing is that all working fine on local computer, and this
message only appear on the web.
I have asked on some forums, but nobody could help..I'm sure you've tried a quick google as it also returns several people
asking the same question, with no response as to the problem. Working on
the principle that the only thing that changes is probably the cause - could
it be a security issue; in that it works whilst running localhost but the
privilege is not granted for intranet / intenet. This could be either the
copyfromscreen function, or any function that populates the copyfromscreen()
parameter list. I had a call to a unmanaged DLL that worked under local
host, but not when I released it to the production site (or when other
people accessed the site on my PC). If you access the site built on your PC
with \\<machinename>\<website>\<page.aspx> rather than \\localhost\
<website>\<page.aspx> does it also fail?
Regards,
- Paul.
"Ecuter" <Ecuter@.discussions.microsoft.com> wrote in message
news:9397F62A-37CD-4DEA-8638-78F3DEC2F3B5@.microsoft.com...
> Hi!
> I`m stucked with this problem and I don`t know what to do ((
> When using CopyFromScreen () function in my Asp.Net application, I reseeve
> this error message - "The handle is invalid"
> The strange thing is that all working fine on local computer, and this
> message only appear on the web.
> I have asked on some forums, but nobody could help..
>
Tuesday, March 13, 2012
The handle is invalid
I`m stucked with this problem and I don`t know what to do ((
When using CopyFromScreen () function in my Asp.Net application, I reseeve
this error message - "The handle is invalid"
The strange thing is that all working fine on local computer, and this
message only appear on the web.
I have asked on some forums, but nobody could help..I'm sure you've tried a quick google as it also returns several people
asking the same question, with no response as to the problem. Working on
the principle that the only thing that changes is probably the cause - could
it be a security issue; in that it works whilst running localhost but the
privilege is not granted for intranet / intenet. This could be either the
copyfromscreen function, or any function that populates the copyfromscreen()
parameter list. I had a call to a unmanaged DLL that worked under local
host, but not when I released it to the production site (or when other
people accessed the site on my PC). If you access the site built on your PC
with \\<machinename>\<website>\<page.aspxrather than \\localhost\
<website>\<page.aspxdoes it also fail?
Regards,
- Paul.
"Ecuter" <Ecuter@.discussions.microsoft.comwrote in message
news:9397F62A-37CD-4DEA-8638-78F3DEC2F3B5@.microsoft.com...
Quote:
Originally Posted by
Hi!
I`m stucked with this problem and I don`t know what to do ((
>
When using CopyFromScreen () function in my Asp.Net application, I reseeve
this error message - "The handle is invalid"
The strange thing is that all working fine on local computer, and this
message only appear on the web.
I have asked on some forums, but nobody could help..
>