<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Avoiding Authentication Prompt on Startup</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You need to allow Anon access within IIS
to not get the Windows Auth box popping up on you not to be confused with
MapGuides Auth box which it seems you might have covered already.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><strong><b><font size=4 color=navy face="Times New Roman"><span
style='font-size:13.5pt;color:navy'><o:p>&nbsp;</o:p></span></font></b></strong></p>

<p class=MsoNormal><strong><b><font size=4 color=navy face="Times New Roman"><span
style='font-size:13.5pt;color:navy'>Chris</span></font></b></strong><font
color=navy><span style='color:navy'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>&nbsp;</span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Buscher, Shane<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 26, 2007 11:22
AM<br>
<b><span style='font-weight:bold'>To:</span></b> MapGuide Users Mail List<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapguide-users] Avoiding
Authentication Prompt on Startup</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I
can&#8217;t seem to find a way to avoid users</span></font> <font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>being</span></font>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>prompted
to authenticate when they open up a MapGuide site for</span></font> <font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>the first
time.&nbsp;</span></font> <font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>After that, they aren&#8217;t prompted again.&nbsp;</span></font>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>You
can cancel out of the authentication and bypass it, but this isn&#8217;t very
elegant.&nbsp;</span></font> <font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>I&#8217;m using the DWF Viewer with .NET/iis 6, and
have the</span></font> <font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>MapGuide virtual directories set to windows authentication
(anonymous access unchecked).&nbsp; I am authenticating on my default page with
the code snippets below, then passing the session Id and</span></font> <font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>web Layout
to the dwf viewer.&nbsp;</span></font> <font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>If anyone has a solution/workaround,
I&#8217;d much</span></font> <font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>appreciate it.</span></font><o:p></o:p></p>

<p><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>Dim</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
site</span></font> <font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>As</span></font> <font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>New</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> MgSite()</span></font><o:p></o:p></p>

<p><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>Dim</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
userInfo</span></font> <font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>As</span></font> <font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>New</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>
MgUserInformation(AppSettings(&quot;mgLogin&quot;), _</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></font> <font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>AppSettings(&quot;mgPassword&quot;))</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>site.Open(userInfo)</span></font><o:p></o:p></p>

<p><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>Dim</span></font> <font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>SessionId</span></font>
<font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>As</span></font> <font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>String</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> =</span></font> <font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>site.CreateSession()</span></font><o:p></o:p></p>

<p><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>Dim</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
WebLayout</span></font> <font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>As</span></font> <font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>String</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> =
AppSettings(&quot;webLayout&quot;)</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>.</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>.</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>.</span></font><o:p></o:p></p>

<p><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;</span></font><font size=2
color=maroon face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:maroon'>iframe</span></font> <font size=2 color=red face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:red'>id</span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>=&quot;ViewerFrame&quot;</span></font> <font size=2
color=red face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>width</span></font><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>=&quot;100%&quot;</span></font>
<font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>height</span></font><font size=2
color=blue face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>=&quot;100%&quot;</span></font> <font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>frameborder</span></font><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>=&quot;0&quot;</span></font>
<font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>src</span></font><font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>=&quot;/mapguide/mapviewernet/dwfviewer.aspx?SESSION=</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>&lt;%=
SessionId</span></font> <font size=2 face="Courier New"><span style='font-size:
10.0pt;font-family:"Courier New"'>%&gt;<font color=blue><span style='color:
blue'>&amp;WEBLAYOUT=</span></font>&lt;%= webLayout</span></font> <font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>%&gt;<font
color=blue><span style='color:blue'>&quot;</span></font></span></font> <font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>&gt;</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>&nbsp;&nbsp;&nbsp;</span></font> <font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&lt;/</span></font><font size=2 color=maroon face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:maroon'>iframe</span></font><font
size=2 color=blue face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:blue'>&gt;</span></font><o:p></o:p></p>

<p><a name=""><font size=2 face=Arial><span style='font-size:10.0pt;font-family:
Arial'>Regards,</span></font></a><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Shane</span></font><o:p></o:p></p>

</div>

</body>

</html>