Ir para conteúdo

POWERED BY:

Arquivado

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

Davi Brito

Erro ao criar projeto web

Recommended Posts

Gente eu estou com problem aao executar um projeto teste no Visual Studio 2008.

 

Quando eu mando criar um novo Empty Web Site aparece a seguinte mensagem:

 

 

Microsoft Visual Studio

Configuring web site "http://...." for Asp.Net 2.0 failed. You must manually configure this site for Asp.Net 2.0 in order for the site to run correctly.

 

Aí eu dou OK.

 

Depois eu crio um novo Web Form. Nesse mesmo instante eu mando compilar e aparece em seguida os seguintes erros:

 

Error 1 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

Error 2 The type or namespace name 'Linq' does not exist in the namespace 'System.Xml' (are you missing an assembly reference?)

 

Em seguida aparece uma janela amarela no broser informando:

 

Erro no processamento de XML: formatado incorretamente

Posição: http://localhost/exemplos_aspnet/WebSite3/index.aspx

Número da linha 1, coluna 2:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

-^

 

O que eu faço ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ola..

 

Aqui vãoa lgumas coisas que você deve checar:

 

1) Caso você tenha instalado o IIS após a instalação da Framework você deve registrar o usuário aps.net no IIS.

2) Verifique se as configurações do seu site no IIS estão apontando para alguma Framework, caso estejam, verifique se esta na FW correta.

3) Verifique as refecencias citadas acimas "System" estão corretamente registradas no GAC.

 

Ao que indica, o IIS não esta reconhecendo a FW em seu computador... em ultimo caso, desinstale e instale novamente a FW.

 

Espero te-lo ajudado, ;)

 

Angelo Compri

Compartilhar este post


Link para o post
Compartilhar em outros sites

não deu certo... ele informa um erro dizendo:

 

Server Error in '/exemplos_aspnet/WebSite2' Application.

Failed to access IIS metabase.

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.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

 

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

 

Source Error:

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

 

Stack Trace:

 

[HostingEnvironmentException: Failed to access IIS metabase.]

System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +637

System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath) +9

System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +174

System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath, Boolean permitNull) +51

System.Web.CachedPathData.GetConfigPathData(String configPath) +341

System.Web.CachedPathData.GetConfigPathData(String configPath) +234

System.Web.CachedPathData.GetConfigPathData(String configPath) +234

System.Web.CachedPathData.GetApplicationPathData() +38

System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +8801967

System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +117

 

 

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

 

eu fui na propriedade em Sites Padrão Web e selecionei a versão do asp.net... mas naun deu certo também

será que eu vou ter que desinstalar o visual e o IIS e reinstalar novamente ?

Sinceramente eu naun entendi o que aconteceu ???

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ola Davi,

 

Como eu disse no 1º item, você deve registrar o usuário do ASP.NET no IIS.

 

Existe um aplicativo chamado aspnet_regiis na pasta C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 e execute o aspnet_regiis.exe com o parâmetro /i:

 

O comando será:

aspnet_regiis.exe /i

Após isso reinicie o computador e tente novamente, se continuar a apresentar o mesmo erro, sugiro que desistale o IIS e o FW e instale na ordem correta:

1º o IIS e 2º a FW.

 

 

Espero te-lo ajudado, ;)

 

Angelo Compri

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.