error in user.cshtml opening site

Jan 12, 2011 at 12:21 PM
Edited Jan 12, 2011 at 12:53 PM

error here

I get nullreferenceexception when people are trying to open my site

 

The strange thing is, in my machine, http://localhost:orchardport nevers throws any errors

I've also tried it from outside the internal network, on a physically distant computer, and the site opens fine.

 

Not sure if its a random error or bound to internal users that share the same gateway or something like that.

 

- Theme applied: The Theme Machine
- Error file: Core\Shapes\Views\User.cshtml
- Error line: #5, in @T("Welcome, <strong>{0}</strong>!", WorkContext.CurrentUser.UserName)
- Reproduced by: Opening website from a computer within the internal network

 

Ideas? Thanks,

 

update:

This issue could only be "surpressed" by direct edit of User.cshtml:

@if(WorkContext.CurrentUser != null)
{
@T("Welcome, <strong>{0}</strong>!", WorkContext.CurrentUser.UserName)
}

Note: @if(WorkContext.CurrentUser.UserName != null) also fails


For what I've seem, when someone opens the website, he "thinks" he is me so he shows "Sign Out" as if I'm logged in.

Coud it be a login validation issue, such as saving a value as login info (mac address) and checking for some other (ip) when the page is open for example?

If this would be the case, the website thinks 192.168.0.2 and 192.168.0.3 is the same person

makes any sense?

 

cheers

Coordinator
Jan 12, 2011 at 6:41 PM

Looks like a bug. Could you file it in the issue tracker? How are users authenticated on this internal network? Are they using IE? Has the site been configured to use Windows authentication?

Jan 12, 2011 at 6:45 PM

I will file the issue.

 

Users user all sorts of different browsers, same problem.

The installation is recent with no customizations whatsoever. I do use a dyndns pointer for all of us to access the web site, both internal and external users.

Internals though, get the crash, at least thats what I've concluded.

Adding the if clause solves it.

Coordinator
Jan 12, 2011 at 7:34 PM

I'm asking about the browser because IE is the only one that does transparent Windows auth, so that might cause weird stuff to happen if the app was configured to use Windows authentication. Thanks for filing the bug.

Apr 8, 2011 at 4:38 AM

FYI - see: http://orchard.codeplex.com/workitem/17198