NETITC
 


>> Navegação >> Tópico >> SubTópico
NomeTítulo Tópicos
Thiago Miranda
Dúvida iniciada: 1/2/2007 9:05:04 AM

Compilando app no IIS - Erro com Membership


Dúvida:  Ola pessoal, estou precisando de um help de vcs.

Tenho uma solution com 4 projetos, sendo 1 projeto website e 3 projetos class library.

Nessa minha solucao, estou usando Membership.
Quando compilo usando a compilacao padrão (F5),
as seguintes linhas de comando funcionam perfeitamente:

MembershipUSer user = Membership.GetUser("Thiago");
Response.Write(user.UserName);

Porém estou agora testando minha app no IIS da minha maquina e fiz a seguinte compilação
descrita abaixo:

"Publish Web Site" informando o direrio fisico do IIS "C:\Inetpub\wwwroot\meusite" com as seguintes opcoes abaixo marcadas:
- allow this precompiled site to be updatable
- use fixed naming and single page assemblies

Porém quando chamo a mesma pagina que havia executado 100% com a compilacao default, esta dando a seguinte mensagem de erro:

Server Error in '/sicsite' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.] Teste.Button1_Click(Object sender, EventArgs e) +37 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


Alguem ja passou por isso??
Que erro pode ser?? Preciso adicionar alguma referencia membership, além
da diretiva System.Web.Security???

Obrigado pessoal..


Respostas Data Resposta: 1/2/2007 9:05:03 AM
Mauricio Junior Thiago,

Dê uma olhada no link abaixo, tem alguns vídeos que mostram sobre membership.
www.devmedia.com.br/articles/listcomp.asp

NETITC


Vídeos

 
Curso de C#


Visto por 41 pessoas.

Vídeo: Gerando Hash com .NET


Visto por 907 pessoas.

Criptografia para ser usada na URL


Visto por 1234 pessoas.

Mudar o toque do iPhone


Visto por 1779 pessoas.

12345678