Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

merge two asp.net website?

0 views
Skip to first unread message

mark

unread,
Aug 12, 2003, 9:38:18 PM8/12/03
to
How to merge two asp.net website? they will use one request.isauthenticated
attribute.

It looks redirect URL from one project to another will make
request.isauthyenticated change to false. (if it's true before redirect)


John Saunders

unread,
Aug 12, 2003, 9:41:40 PM8/12/03
to
"mark" <cng...@hotmail.com> wrote in message
news:O%23VKVuTY...@tk2msftngp13.phx.gbl...

What is the Domain of the cookies you're setting? To work on localhost, it
should be String.Empty.

--
John Saunders
Internet Engineer
john.s...@surfcontrol.com


Natty Gur

unread,
Aug 12, 2003, 11:53:17 PM8/12/03
to
Hi,

Every web application assigns to dedicate App Domain. CLR don’t let one
App. Domain to access other App. Domains memory space (as the operating
system does with process). Request is part of the application so every
request represent other session that is part of different application. I
don’t think that you can share isauthyenticated because setting it on
one web application got nothing to do with other web applications.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

John Saunders

unread,
Aug 13, 2003, 3:23:25 AM8/13/03
to
"Natty Gur" <na...@dao2com.com> wrote in message
news:eazDv5UY...@TK2MSFTNGP12.phx.gbl...

> Hi,
>
> Every web application assigns to dedicate App Domain. CLR don't let one
> App. Domain to access other App. Domains memory space (as the operating
> system does with process). Request is part of the application so every
> request represent other session that is part of different application. I
> don't think that you can share isauthyenticated because setting it on
> one web application got nothing to do with other web applications.

If both web applications use Forms authentication, and if they both use the
same cookie name, domain name and path, and if they both have the same
<machineKey> settings, then being authenticated in one application will
imply being authenticated in the other. This will give the affect of their
sharing IsAuthenticated.

Nick

unread,
Aug 13, 2003, 12:36:42 PM8/13/03
to
John may be right. My two projects used to share the IsAuthenticated
without problem. But it suddenly didn't work since this week.

Now, the Request.IsAuthenticated is true in the my code after
authenticating, after redirect to URL in another project which also sets
forms authentication in web.config (authenticate="forms" deny ? users,
etc). The IsAuthenticated changed to false right after redirecting to
the URL.

Should I copy web.config of my first project to overwrite the second one
instead of modify the "authenticate" and "deny"?

John Saunders

unread,
Aug 13, 2003, 5:46:31 PM8/13/03
to
"Nick" <nb...@hotmail.com.nospam> wrote in message
news:eajTVkbY...@tk2msftngp13.phx.gbl...

> John may be right. My two projects used to share the IsAuthenticated
> without problem. But it suddenly didn't work since this week.
>
> Now, the Request.IsAuthenticated is true in the my code after
> authenticating, after redirect to URL in another project which also sets
> forms authentication in web.config (authenticate="forms" deny ? users,
> etc). The IsAuthenticated changed to false right after redirecting to
> the URL.
>
> Should I copy web.config of my first project to overwrite the second one
> instead of modify the "authenticate" and "deny"?

Nick,

Don't change your web.config without knowing why.

Forms authentication problems almost always come down to cookie problems. So
you'll want to track the cookie.

I suggest turning on tracing in both projects:

<trace enabled="true" requestLimit="100" pageOutput="false"
traceMode="SortByTime" localOnly="true" />

Then, reproduce the problem and then look at http://localhost/app1/trace.axd
and http://localhost/app2/trace.axd. In particular, go through the requests
and check the Cookies collection for each step.

If you find that the cookie from app1 never gets to app2, check things like
the cookie name, domain, path and expiration for reasons why it wouldn't get
there.

--
John Saunders
Internet Engineer
john.s...@surfcontrol.com

> John Saunders wrote:

0 new messages