Click here to Skip to main content
15,886,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHTML Print of Selected Tab using RenderControl Method Pin
NTheOne21-Jul-10 21:17
NTheOne21-Jul-10 21:17 
AnswerRe: HTML Print of Selected Tab Pin
Peace ON21-Jul-10 21:30
Peace ON21-Jul-10 21:30 
QuestionGlobal Distribution System in ASP.NET website Pin
Ahamed Azeem21-Jul-10 20:55
Ahamed Azeem21-Jul-10 20:55 
AnswerRe: Global Distribution System in ASP.NET website Pin
Peace ON21-Jul-10 21:15
Peace ON21-Jul-10 21:15 
QuestionGridview Column colors Pin
codingrocks21-Jul-10 18:40
codingrocks21-Jul-10 18:40 
AnswerRe: Gridview Column colors Pin
Prosanta Kundu online21-Jul-10 19:01
Prosanta Kundu online21-Jul-10 19:01 
AnswerRe: Gridview Column colors Pin
Peace ON21-Jul-10 19:44
Peace ON21-Jul-10 19:44 
QuestionGetting sessions to ASMX webservice Pin
Matt Cavanagh21-Jul-10 8:40
Matt Cavanagh21-Jul-10 8:40 
I have an ASMX webservice hosted alongside my ASP.NET web app. It is in the same project, hosted as the same IIS web application, and compiles to the same DLL. Now, I need to get the users session into the Webservice. To test this I made this simple method:
[WebMethod(EnableSession = true)]
    public string checkSession()
    {
        return HttpContext.Current.Session["userid"].ToString();
    }


So, first I login to my web app, then in the browser goto my webservice and click "checkSession" on that auto generated test page. I have tested this on 3 computers. All 3 of those work fine with the webapp(so the sessions are being created etc), and 2 of those return the value of Session["userid"] on invoking the webmethod, however the last computer returns "Object reference not set to an instance of an object" because Session is null.

So, whats the difference between these computers and why can my ASP.NET app get the sessions on all computers but the webservice cant?
I have also tested with my cellphone and it works there too.


ThanksSmile | :)
Strive to be humble enough to take advice, and confident enough to do something about it.

AnswerRe: Getting sessions to ASMX webservice Pin
Yusuf21-Jul-10 9:01
Yusuf21-Jul-10 9:01 
QuestionRe: Getting sessions to ASMX webservice [modified] Pin
Matt Cavanagh21-Jul-10 9:30
Matt Cavanagh21-Jul-10 9:30 
Questionproblem writing in doc file Pin
Dhyanga21-Jul-10 5:39
Dhyanga21-Jul-10 5:39 
AnswerRe: problem writing in doc file Pin
Yusuf21-Jul-10 6:06
Yusuf21-Jul-10 6:06 
GeneralRe: problem writing in doc file [modified] Pin
Dhyanga21-Jul-10 6:14
Dhyanga21-Jul-10 6:14 
QuestionJava script reset problem Pin
immu521-Jul-10 5:37
immu521-Jul-10 5:37 
AnswerRe: Java script reset problem Pin
Yusuf21-Jul-10 6:18
Yusuf21-Jul-10 6:18 
AnswerRe: Java script reset problem Pin
Not Active21-Jul-10 8:53
mentorNot Active21-Jul-10 8:53 
GeneralRe: Java script reset problem Pin
immu521-Jul-10 8:59
immu521-Jul-10 8:59 
GeneralRe: Java script reset problem Pin
Not Active21-Jul-10 9:26
mentorNot Active21-Jul-10 9:26 
QuestionASP.NET Crystal Report Issue Pin
Hema Bairavan21-Jul-10 1:31
Hema Bairavan21-Jul-10 1:31 
AnswerRe: ASP.NET Crystal Report Issue Pin
Ennis Ray Lynch, Jr.21-Jul-10 4:00
Ennis Ray Lynch, Jr.21-Jul-10 4:00 
QuestionConnect to ms-sqlserver by using ADO.Net Pin
kimvisal21-Jul-10 0:20
kimvisal21-Jul-10 0:20 
AnswerRe: Connect to ms-sqlserver by using ADO.Net Pin
Ankur\m/21-Jul-10 1:10
professionalAnkur\m/21-Jul-10 1:10 
AnswerRe: Connect to ms-sqlserver by using ADO.Net Pin
Sandeep Mewara21-Jul-10 5:45
mveSandeep Mewara21-Jul-10 5:45 
AnswerRe: Connect to ms-sqlserver by using ADO.Net Pin
Prosanta Kundu online21-Jul-10 19:18
Prosanta Kundu online21-Jul-10 19:18 
QuestionWhile Loop Problem in SQL Pin
jintalPatel20-Jul-10 22:46
jintalPatel20-Jul-10 22:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.