Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
bhavesh7098

Registered:
Posts: 56
Reply with quote  #1 
I have weird problem after deployed my website to IIS by using running by Microsoft IIS. I have set up the  Windoes auth. security set up by Database.

I have SQL running user= username().

I am  not getting any value in 'Username()' getting only blank ' ' value.


Thanks,
Bhavesh 
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,950
Reply with quote  #2 
When running with IIS we always use Mixed (SQL Server And Windows Authentication) Mode and depending on environment we encrypt the config connection string.

You may find good reason why it should be donethat way:
http://stackoverflow.com/questions/32480583/cannot-get-username-when-hosted-on-iis7-using-system-environment-username

HTH,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

bhavesh7098

Registered:
Posts: 56
Reply with quote  #3 
I am using window Auth in IIS. Please see attached screenshot. I am getting ' ' blank value instead of Username().

Attached Images
Click image for larger version - Name: fig1.PNG, Views: 6, Size: 119.12 KB  Click image for larger version - Name: Fig2.PNG, Views: 6, Size: 13.65 KB 

JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,950
Reply with quote  #4 
You must use SQL Server And Windows Authentication Mode. Create SQL Login and DB Users then use it in your connection string. 
__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

bhavesh7098

Registered:
Posts: 56
Reply with quote  #5 
Thanks Jim! You have always helped me. I really appreciate.

 
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,950
Reply with quote  #6 
It's my pleasure! [smile]
__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement