Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

igorfds

Tentando publicar VB

Recommended Posts

Ola Boa Tarde...

 

Não conheço praticamente nada de ASP e precisava publicar um sitema em VB e está dando o seguinte erro:

 

 

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The Runat attribute must have the value Server.

Source Error:

Line 4: Line 5: <html xmlns="http://www.w3.org/1999/xhtml"> Line 6: <head runat="Default.aspx.vb"> Line 7: <title></title> Line 8: </head>

 

Será que alguem poderia me ajudar??

Compartilhar este post


Link para o post
Compartilhar em outros sites

O erro é, provavelmente, na página aspx. Ou. Ascx.

Aqui está um trecho de código que vai dar esse erro exata:

<body>
<form id="Form1" method="post" runat="server">
<asp:CheckBoxList id="CheckBoxList1" runat=""></asp:CheckBoxList>
</form>
</body>

Note-se que o atributo runat NÃO tem valor servidor. Você pode corrigir o
erro ao escrever o quanto isto:

<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<asp:CheckBoxList id="CheckBoxList1"
runat="server"></asp:CheckBoxList>
</form>
</body>

Compartilhar este post


Link para o post
Compartilhar em outros sites

O erro é, provavelmente, na página aspx. Ou. Ascx.

 

Aqui está um trecho de código que vai dar esse erro exata:

 

<body>

<form id="Form1" method="post" runat="server">

<asp:CheckBoxList id="CheckBoxList1" runat=""></asp:CheckBoxList>

</form>

</body>

 

Note-se que o atributo runat NÃO tem valor servidor. Você pode corrigir o

erro ao escrever o quanto isto:

 

<body MS_POSITIONING="FlowLayout">

<form id="Form1" method="post" runat="server">

<asp:CheckBoxList id="CheckBoxList1"

runat="server"></asp:CheckBoxList>

</form>

</body>

 

Parece que ao inserir essas linhas o arquivo vb entrou, mais agora o problema parece ser outro... segue:

 

Server Error in '/' Application. Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

 

Compiler Error Message: BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

 

Source Error:

 

Line 3: Inherits System.Web.UI.Page Line 4: Line 5: Protected Sub ButBaixar_Click(sender As Object, e As EventArgs) Handles ButBaixar.Click Line 6: NFeXmlDownload.CaptchaBaixar(Server.MapPath(".") & "\Captcha.gif") Line 7: Dim Captcha As String = CaptchaLeitor.Ler(Server.MapPath(".") & "\Captcha.gif", "DJRQL6W3BDUCUDKRHFPWBYS41BY9KKNDAIW7J2YY")

 

Source File: e:\home\fasan\Web\ohms\Default.aspx.vb Line: 5

 

 

Show Detailed Compiler Output:

c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5793becc\b2ee4da7\App_Web_vq2f2xs9.dll" /debug- /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5793becc\b2ee4da7\App_Web_vq2f2xs9.0.vb" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5793becc\b2ee4da7\App_Web_vq2f2xs9.1.vb" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5793becc\b2ee4da7\App_Web_vq2f2xs9.2.vb" Microsoft ® Visual Basic Compiler version 8.0.50727.4016 for Microsoft ® .NET Framework version 2.0.50727.4234 Copyright (c) Microsoft Corporation. All rights reserved. e:\home\fasan\Web\ohms\Default.aspx.vb(5) : error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types. Protected Sub ButBaixar_Click(sender As Object, e As EventArgs) Handles ButBaixar.Click ~~~~~~~~~ e:\home\fasan\Web\ohms\Default.aspx.vb(6) : error BC30451: Name 'NFeXmlDownload' is not declared. NFeXmlDownload.CaptchaBaixar(Server.MapPath(".") & "\Captcha.gif") ~~~~~~~~~~~~~~ e:\home\fasan\Web\ohms\Default.aspx.vb(7) : error BC30451: Name 'CaptchaLeitor' is not declared. Dim Captcha As String = CaptchaLeitor.Ler(Server.MapPath(".") & "\Captcha.gif", "DJRQL6W3BDUCUDKRHFPWBYS41BY9KKNDAIW7J2YY") ~~~~~~~~~~~~~ e:\home\fasan\Web\ohms\Default.aspx.vb(8) : error BC30451: Name 'NFeXmlDownload' is not declared. Dim Res As String = NFeXmlDownload.DownloadNFeXML(TextChave.Text, Captcha, Server.MapPath(".") & "\temp.xml") ~~~~~~~~~~~~~~ e:\home\fasan\Web\ohms\Default.aspx.vb(8) : error BC30451: Name 'TextChave' is not declared. Dim Res As String = NFeXmlDownload.DownloadNFeXML(TextChave.Text, Captcha, Server.MapPath(".") & "\temp.xml") ~~~~~~~~~ 

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.