From: Gadgetman on
I have being running a WEB Application on Win2003 Server and all was
working, with typical URLS of the following form:-
http://10.0.0.19/CRM/Users/Members.aspx

Then suddenly, I am getting URLs of the following form:-
http://10.0.0.19/CRM/Default.aspx?ReturnUrl=%2fCRM%2fUsers%2fMembers.aspx

My software now fails! Where is this ReturnUrl= coming from?

I suspect that another contractor, also deploying software to this
server, has enabled some option that has caused this to happen.

Can someone explain what is happening here?
How do I get rid of this ReturnUrl= feature?

Thanks, Stewart
From: Gadgetman on
On Jun 27, 12:46 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
> I have being running a WEB Application on Win2003 Server and all was
> working, with typical URLS of the following form:-http://10.0.0.19/CRM/Users/Members.aspx
>
> Then suddenly, I am getting URLs of the following form:-http://10.0.0.19/CRM/Default.aspx?ReturnUrl=%2fCRM%2fUsers%2fMembers....
>
> My software now fails! Where is this ReturnUrl= coming from?
>
> I suspect that another contractor, also deploying software to this
> server, has enabled some option that has caused this to happen.
>
> Can someone explain what is happening here?
> How do I get rid of this ReturnUrl= feature?
>
> Thanks, Stewart

Further, I have now found that when running this web app in VS2010
locally, if I leave the login to timeout, and select another page, I
get a URL:-
http://localhost:49293/Default.aspx?ReturnUrl=%2fUsers%2fMIBFA.aspx

So this ReturnURL is being injected by the MS <asp:LoginView engine?

But still not sure of a solution!

From: Gadgetman on
On Jun 27, 1:45 pm, Gadgetman <stewart.gad...(a)gmail.com> wrote:
> On Jun 27, 12:46 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
> > I have being running a WEB Application on Win2003 Server and all was
> > working, with typical URLS of the following form:-http://10.0.0.19/CRM/Users/Members.aspx
>
> > Then suddenly, I am getting URLs of the following form:-http://10.0.0.19/CRM/Default.aspx?ReturnUrl=%2fCRM%2fUsers%2fMembers....
>
> > My software now fails! Where is this ReturnUrl= coming from?
>
> > I suspect that another contractor, also deploying software to this
> > server, has enabled some option that has caused this to happen.
>
> > Can someone explain what is happening here?
> > How do I get rid of this ReturnUrl= feature?
>
> > Thanks, Stewart
>
> Further, I have now found that when running this web app in VS2010
> locally, if I leave the login to timeout, and select another page, I
> get a URL:-http://localhost:49293/Default.aspx?ReturnUrl=%2fUsers%2fMIBFA.aspx
>
> So this ReturnURL is being injected by the MS <asp:LoginView engine?
>
> But still not sure of a solution!

I should show my <asp:LoginView code and the web.config entries:-
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>
<br />
<br />
<div style="width:917px;"><h3>&nbsp;Welcome back
<asp:LoginName ID="LoginName1" runat="server" />.</h3>
&nbsp;Click on one of the buttons on the panel above<br /
><br />
&nbsp;You may <asp:HyperLink ID="HyperLink1"
runat="server" NavigateUrl="~/Users/ChangePassword.aspx">change your
password here.</asp:HyperLink><br />
</div>
</LoggedInTemplate>
<AnonymousTemplate>
<br />
<br /><center>
<asp:Login ID="lgnLogin" Runat="server"
UserNameLabelText="User ID:" BorderStyle="Solid"
BorderWidth="1px"
BorderColor="#CCCC99" BackColor="#F7F7DE"
Font-Names="Verdana" Font-Size="10pt"
PasswordRecoveryText="Forgot your password?"
PasswordRecoveryUrl="~/ForgotPassword.aspx">
<InstructionTextStyle Font-Size="0.8em"></
InstructionTextStyle>
<CheckBoxStyle Font-Size="0.8em"></CheckBoxStyle>
<LabelStyle Font-Size="0.8em"></LabelStyle>
<TitleTextStyle Font-Bold="True"
BackColor="#6B696B" ForeColor="#FFFFFF"></TitleTextStyle>
<HyperLinkStyle Font-Size="0.8em"></HyperLinkStyle>
<FailureTextStyle Font-Size="0.8em"
ForeColor="#FF0000"></FailureTextStyle>
</asp:Login>
</center>
</AnonymousTemplate>
</asp:LoginView>

WEB.CONFIG snapshot:-
<authentication mode="Forms">
<forms loginUrl="~/Default.aspx"/>
</authentication>

<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="SeifsaASPNETDB" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="/SeifsaCRM" requiresUniqueEmail="false"
passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>

<profile>
<providers>
<remove name="AspNetSqlProfileProvider"/>
<add name="AspNetSqlProfileProvider"
connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
type="System.Web.Profile.SqlProfileProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</profile>

<roleManager enabled="true">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="AspNetSqlRoleProvider"
connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<remove name="AspNetWindowsTokenRoleProvider"/>
<add name="AspNetWindowsTokenRoleProvider" applicationName="/
SeifsaCRM" type="System.Web.Security.WindowsTokenRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>




From: cubaman on
On Jun 28, 9:36 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
> On Jun 27, 1:45 pm, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
>
>
> > On Jun 27, 12:46 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
> > > I have being running a WEB Application on Win2003 Server and all was
> > > working, with typical URLS of the following form:-http://10.0.0.19/CRM/Users/Members.aspx
>
> > > Then suddenly, I am getting URLs of the following form:-http://10.0.0..19/CRM/Default.aspx?ReturnUrl=%2fCRM%2fUsers%2fMembers....
>
> > > My software now fails! Where is this ReturnUrl= coming from?
>
> > > I suspect that another contractor, also deploying software to this
> > > server, has enabled some option that has caused this to happen.
>
> > > Can someone explain what is happening here?
> > > How do I get rid of this ReturnUrl= feature?
>
> > > Thanks, Stewart
>
> > Further, I have now found that when running this web app in VS2010
> > locally, if I leave the login to timeout, and select another page, I
> > get a URL:-http://localhost:49293/Default.aspx?ReturnUrl=%2fUsers%2fMIBFA.aspx
>
> > So this ReturnURL is being injected by the MS <asp:LoginView engine?
>
> > But still not sure of a solution!
>
> I should show my <asp:LoginView code and the web.config entries:-
> <asp:LoginView ID="LoginView1" runat="server">
>         <LoggedInTemplate>
>             <br />
>             <br />
>             <div style="width:917px;"><h3>&nbsp;Welcome back
> <asp:LoginName ID="LoginName1" runat="server" />.</h3>
>             &nbsp;Click on one of the buttons on the panel above<br /><br />
>
>             &nbsp;You may <asp:HyperLink ID="HyperLink1"
> runat="server" NavigateUrl="~/Users/ChangePassword.aspx">change your
> password here.</asp:HyperLink><br />
>             </div>
>         </LoggedInTemplate>
>         <AnonymousTemplate>
>             <br />
>             <br /><center>
>             <asp:Login ID="lgnLogin" Runat="server"
>                     UserNameLabelText="User ID:" BorderStyle="Solid"
> BorderWidth="1px"
>                     BorderColor="#CCCC99" BackColor="#F7F7DE"
>                     Font-Names="Verdana" Font-Size="10pt"
>                     PasswordRecoveryText="Forgot your password?"
>                     PasswordRecoveryUrl="~/ForgotPassword.aspx">
>                    <InstructionTextStyle Font-Size="0.8em"></
> InstructionTextStyle>
>                    <CheckBoxStyle Font-Size="0.8em"></CheckBoxStyle>
>                    <LabelStyle Font-Size="0.8em"></LabelStyle>
>                    <TitleTextStyle Font-Bold="True"
> BackColor="#6B696B" ForeColor="#FFFFFF"></TitleTextStyle>
>                    <HyperLinkStyle Font-Size="0.8em"></HyperLinkStyle>
>                    <FailureTextStyle Font-Size="0.8em"
> ForeColor="#FF0000"></FailureTextStyle>
>             </asp:Login>
>             </center>
>         </AnonymousTemplate>
>     </asp:LoginView>
>
> WEB.CONFIG snapshot:-
>     <authentication mode="Forms">
>       <forms loginUrl="~/Default.aspx"/>
>     </authentication>
>
>     <membership>
>       <providers>
>         <remove name="AspNetSqlMembershipProvider"/>
>         <add name="AspNetSqlMembershipProvider"
> type="System.Web.Security.SqlMembershipProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="SeifsaASPNETDB" enablePasswordRetrieval="false"
> enablePasswordReset="true" requiresQuestionAndAnswer="true"
> applicationName="/SeifsaCRM" requiresUniqueEmail="false"
> passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
> minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
> passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
>       </providers>
>     </membership>
>
>     <profile>
>       <providers>
>         <remove name="AspNetSqlProfileProvider"/>
>         <add name="AspNetSqlProfileProvider"
> connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
> type="System.Web.Profile.SqlProfileProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
>       </providers>
>     </profile>
>
>     <roleManager enabled="true">
>       <providers>
>         <remove name="AspNetSqlRoleProvider"/>
>         <add name="AspNetSqlRoleProvider"
> connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
> type="System.Web.Security.SqlRoleProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
>         <remove name="AspNetWindowsTokenRoleProvider"/>
>         <add name="AspNetWindowsTokenRoleProvider" applicationName="/
> SeifsaCRM" type="System.Web.Security.WindowsTokenRoleProvider,
> System.Web, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a"/>
>       </providers>
>     </roleManager>

Hello:
If someone else settings are causing you trouble, try writing a
"clear" command at the begin of your providers and connection string
settings, like:
<membership>
<clear/>
<providers> ..............

<profile>
<clear/>
<providers> .................

Best regards
From: Gadgetman on
On Jun 28, 10:20 am, cubaman <oscar.acostamonte...(a)googlemail.com>
wrote:
> On Jun 28, 9:36 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
>
>
>
>
> > On Jun 27, 1:45 pm, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
> > > On Jun 27, 12:46 am, Gadgetman <stewart.gad...(a)gmail.com> wrote:
>
> > > > I have being running a WEB Application on Win2003 Server and all was
> > > > working, with typical URLS of the following form:-http://10.0.0.19/CRM/Users/Members.aspx
>
> > > > Then suddenly, I am getting URLs of the following form:-http://10.0..0.19/CRM/Default.aspx?ReturnUrl=%2fCRM%2fUsers%2fMembers....
>
> > > > My software now fails! Where is this ReturnUrl= coming from?
>
> > > > I suspect that another contractor, also deploying software to this
> > > > server, has enabled some option that has caused this to happen.
>
> > > > Can someone explain what is happening here?
> > > > How do I get rid of this ReturnUrl= feature?
>
> > > > Thanks, Stewart
>
> > > Further, I have now found that when running this web app in VS2010
> > > locally, if I leave the login to timeout, and select another page, I
> > > get a URL:-http://localhost:49293/Default.aspx?ReturnUrl=%2fUsers%2fMIBFA.aspx
>
> > > So this ReturnURL is being injected by the MS <asp:LoginView engine?
>
> > > But still not sure of a solution!
>
> > I should show my <asp:LoginView code and the web.config entries:-
> > <asp:LoginView ID="LoginView1" runat="server">
> >         <LoggedInTemplate>
> >             <br />
> >             <br />
> >             <div style="width:917px;"><h3>&nbsp;Welcome back
> > <asp:LoginName ID="LoginName1" runat="server" />.</h3>
> >             &nbsp;Click on one of the buttons on the panel above<br /><br />
>
> >             &nbsp;You may <asp:HyperLink ID="HyperLink1"
> > runat="server" NavigateUrl="~/Users/ChangePassword.aspx">change your
> > password here.</asp:HyperLink><br />
> >             </div>
> >         </LoggedInTemplate>
> >         <AnonymousTemplate>
> >             <br />
> >             <br /><center>
> >             <asp:Login ID="lgnLogin" Runat="server"
> >                     UserNameLabelText="User ID:" BorderStyle="Solid"
> > BorderWidth="1px"
> >                     BorderColor="#CCCC99" BackColor="#F7F7DE"
> >                     Font-Names="Verdana" Font-Size="10pt"
> >                     PasswordRecoveryText="Forgot your password?"
> >                     PasswordRecoveryUrl="~/ForgotPassword.aspx">
> >                    <InstructionTextStyle Font-Size="0.8em"></
> > InstructionTextStyle>
> >                    <CheckBoxStyle Font-Size="0.8em"></CheckBoxStyle>
> >                    <LabelStyle Font-Size="0.8em"></LabelStyle>
> >                    <TitleTextStyle Font-Bold="True"
> > BackColor="#6B696B" ForeColor="#FFFFFF"></TitleTextStyle>
> >                    <HyperLinkStyle Font-Size="0.8em"></HyperLinkStyle>
> >                    <FailureTextStyle Font-Size="0..8em"
> > ForeColor="#FF0000"></FailureTextStyle>
> >             </asp:Login>
> >             </center>
> >         </AnonymousTemplate>
> >     </asp:LoginView>
>
> > WEB.CONFIG snapshot:-
> >     <authentication mode="Forms">
> >       <forms loginUrl="~/Default.aspx"/>
> >     </authentication>
>
> >     <membership>
> >       <providers>
> >         <remove name="AspNetSqlMembershipProvider"/>
> >         <add name="AspNetSqlMembershipProvider"
> > type="System.Web.Security.SqlMembershipProvider, System.Web,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> > connectionStringName="SeifsaASPNETDB" enablePasswordRetrieval="false"
> > enablePasswordReset="true" requiresQuestionAndAnswer="true"
> > applicationName="/SeifsaCRM" requiresUniqueEmail="false"
> > passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
> > minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
> > passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
> >       </providers>
> >     </membership>
>
> >     <profile>
> >       <providers>
> >         <remove name="AspNetSqlProfileProvider"/>
> >         <add name="AspNetSqlProfileProvider"
> > connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
> > type="System.Web.Profile.SqlProfileProvider, System.Web,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> >       </providers>
> >     </profile>
>
> >     <roleManager enabled="true">
> >       <providers>
> >         <remove name="AspNetSqlRoleProvider"/>
> >         <add name="AspNetSqlRoleProvider"
> > connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
> > type="System.Web.Security.SqlRoleProvider, System.Web,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> >         <remove name="AspNetWindowsTokenRoleProvider"/>
> >         <add name="AspNetWindowsTokenRoleProvider" applicationName="/
> > SeifsaCRM" type="System.Web.Security.WindowsTokenRoleProvider,
> > System.Web, Version=2.0.0.0, Culture=neutral,
> > PublicKeyToken=b03f5f7f11d50a3a"/>
> >       </providers>
> >     </roleManager>
>
> Hello:
> If someone else settings are causing you trouble, try writing a
> "clear" command at the begin of your providers and connection string
> settings, like:
> <membership>
>       <clear/>
>       <providers> ..............
>
> <profile>
>       <clear/>
>       <providers> .................
>
> Best regards

OK I tried that,

<membership>
<clear/>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="SeifsaASPNETDB" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="/SeifsaCRM" requiresUniqueEmail="false"
passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>

<profile>
<clear/>
<providers>
<remove name="AspNetSqlProfileProvider"/>
<add name="AspNetSqlProfileProvider"
connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
type="System.Web.Profile.SqlProfileProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</profile>

<roleManager enabled="true">
<clear/>
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="AspNetSqlRoleProvider"
connectionStringName="SeifsaASPNETDB" applicationName="/SeifsaCRM"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<remove name="AspNetWindowsTokenRoleProvider"/>
<add name="AspNetWindowsTokenRoleProvider" applicationName="/
SeifsaCRM" type="System.Web.Security.WindowsTokenRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>


But IIS not happy with it:-

Configuration Error
Description: An error occurred during the processing of a
configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.

Parser Error Message: Unrecognized element 'clear'.

Source Error:

Line 102:
Line 103: <profile>
Line 104: <clear/>
Line 105: <providers>
Line 106: <remove name="AspNetSqlProfileProvider"/>


Source File: E:\Websites\SeifsaCRM-DV\web.config Line: 104