Saturday, March 31, 2012

Sharing data across web forms?

I am using Infragistics UltraWebTab (a tab folder control for ASP.NET). My
tab folder control will include five tab pages with a separate web form on
each, and these web forms will share data.
My questions regard the data tier, that is, how I should construct the data
objects so as to reduce memory usage while optimizing page performance?
1. I'll be using data sets. How can I share a single data set across the
multiple web forms?
2. Can the data adapters be shared across the pages?
3. If not, what is the memory overhead for having multiple identical data
adapters open?
Thanks in advance,
Mervin Williams1) You can use Session State or create a shard class (class with all shared
methods in VB.NET or static memebers in C#) (use the shared if you want the
data shared by All users, if you want it specific to the individual, session
state will work
2) Yes, but no need to do it. They area perfect object to implement as
Shared or static since their logic is the same across classes
3) DataAdapters are never 'open'. They are declared, possilbly
instantiated, but the only thing that 'opens' is connections. Like anything,
use only as much as you need. However, the dataadapter doesn't give a hoot
about the data per se. It just looks to rowstate to decide what it's going
to do with something. So you can create your own data access layer with
pretty much the same configuration and pass different datasetsto it.
Remember that you can fill a dataset/datatable with one dataadapter and
update say 3 different databases with 3 other data adapters never using the
first one again. I divorces itself from the data as soon as fill/update etc
is complete.
HTH,
Bill
"Mervin Williams" <mwilliams@.innovasolutions.net> wrote in message
news:OhmrDZjHEHA.3444@.TK2MSFTNGP11.phx.gbl...
> I am using Infragistics UltraWebTab (a tab folder control for ASP.NET).
My
> tab folder control will include five tab pages with a separate web form on
> each, and these web forms will share data.
> My questions regard the data tier, that is, how I should construct the
data
> objects so as to reduce memory usage while optimizing page performance?
> 1. I'll be using data sets. How can I share a single data set across the
> multiple web forms?
> 2. Can the data adapters be shared across the pages?
> 3. If not, what is the memory overhead for having multiple identical data
> adapters open?
> Thanks in advance,
> Mervin Williams
>
Hi Mervin,
In addition to Bill, when you really want to save memory you can also use
the viewstate, however you are transporting that to the client of course.
Cor

sharing data between custom controls

I have two custom controls on a page that work on the same object that needs
some prepping when first loaded. Currently I just load them in both controls
individually, essentially doing the same work twice.
What's the best way to share data between controls? I know I could place the
data in HttpContext, but would I essentially be tripling the amount of
memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
control2. Unless context works by reference. Otherwise, is there a better
way? The controls inherit from a common class already -- is there any way to
have a variable in that parent class that is shared within a page?
ThanksBTW -- there's no need to persist the data after the page is rendered. Sorry
I didn't clarify this. It's just data used while rendering the controls. The
data is needed by various controls.
"axis" <justposttothenewsgroup@.nospam.com> wrote in message
news:qoy4d.97680$D%.48936@.attbi_s51...
>I have two custom controls on a page that work on the same object that
>needs some prepping when first loaded. Currently I just load them in both
>controls individually, essentially doing the same work twice.
> What's the best way to share data between controls? I know I could place
> the data in HttpContext, but would I essentially be tripling the amount of
> memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
> control2. Unless context works by reference. Otherwise, is there a better
> way? The controls inherit from a common class already -- is there any way
> to have a variable in that parent class that is shared within a page?
> Thanks
>
Create the object at the page level and pass it to both controls.
Jonathan Allen
"axis" <justposttothenewsgroup@.nospam.com> wrote in message
news:qoy4d.97680$D%.48936@.attbi_s51...
> I have two custom controls on a page that work on the same object that
needs
> some prepping when first loaded. Currently I just load them in both
controls
> individually, essentially doing the same work twice.
> What's the best way to share data between controls? I know I could place
the
> data in HttpContext, but would I essentially be tripling the amount of
> memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
> control2. Unless context works by reference. Otherwise, is there a better
> way? The controls inherit from a common class already -- is there any way
to
> have a variable in that parent class that is shared within a page?
> Thanks
>

sharing data between custom controls

I have two custom controls on a page that work on the same object that needs
some prepping when first loaded. Currently I just load them in both controls
individually, essentially doing the same work twice.

What's the best way to share data between controls? I know I could place the
data in HttpContext, but would I essentially be tripling the amount of
memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
control2. Unless context works by reference. Otherwise, is there a better
way? The controls inherit from a common class already -- is there any way to
have a variable in that parent class that is shared within a page?

ThanksBTW -- there's no need to persist the data after the page is rendered. Sorry
I didn't clarify this. It's just data used while rendering the controls. The
data is needed by various controls.

"axis" <justposttothenewsgroup@.nospam.com> wrote in message
news:qoy4d.97680$D%.48936@.attbi_s51...
>I have two custom controls on a page that work on the same object that
>needs some prepping when first loaded. Currently I just load them in both
>controls individually, essentially doing the same work twice.
> What's the best way to share data between controls? I know I could place
> the data in HttpContext, but would I essentially be tripling the amount of
> memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
> control2. Unless context works by reference. Otherwise, is there a better
> way? The controls inherit from a common class already -- is there any way
> to have a variable in that parent class that is shared within a page?
> Thanks
Create the object at the page level and pass it to both controls.

--
Jonathan Allen

"axis" <justposttothenewsgroup@.nospam.com> wrote in message
news:qoy4d.97680$D%.48936@.attbi_s51...
> I have two custom controls on a page that work on the same object that
needs
> some prepping when first loaded. Currently I just load them in both
controls
> individually, essentially doing the same work twice.
> What's the best way to share data between controls? I know I could place
the
> data in HttpContext, but would I essentially be tripling the amount of
> memory I'm using? 1 copy in control1, 1 copy in context, and 1 copy in
> control2. Unless context works by reference. Otherwise, is there a better
> way? The controls inherit from a common class already -- is there any way
to
> have a variable in that parent class that is shared within a page?
> Thanks

Sharing Data between ASP and ASP.Net

Presently I program in ASP. With ASP.Net being the new thing, I would like to learn it. As a result, most of my pages are in ASP, but I would like to share data with ASP.Net pages. For example, if a user logs in on an ASP page, I would like to be able to use the same login information on the ASP.Net pages, without requiring the user to log in again. Is there a way to do this other than with FSO and storing a temporary value in the database?One option is to use a cookie that is shared between ASP and ASP.NET. Session state is not shared between ASP and ASP.NET, and hitting a datase each page load is a bit extreme. It iwll likely in the end require changes in the ASP code, and compromises in the ASP.NET code.
this may help :

<a href="http://links.10026.com/?link=http://rtfm.atrax.co.uk/infinitemonkeys/articles/asp.net/993.asp>http://rtfm.atrax.co.uk/infinitemonkeys/articles/asp.net/993.asp</a
ASP and ASP.NET can share :

cookies
querystrings and form posts
data sources

they can't share Session without a third-party addon such as Sessionbridge - www.sessionbridge.com

j

Sharing data between various pages


Hi all,

I am a newbie to asp.net web applications.
My web application consists of various aspx pages. The Default.aspx page is made up offrames, where each of the frames's source is an aspx page. It consists of 3 frames. The first frame's source page is First.aspx. The second frame's source page is Second.aspx. The third's is Third.aspx.

Is itcorrect to have like this. I have made the source of each frame as anaspx page because I want to display the items in each frame usingRepeater control.

The application's start page(which is StartPage.aspx) takes the query string, calculates theresult and sets the value to a variable named Result.
Now I want to use this Result object in the source aspx pages of eachframe. I want to load each of the frames with some values, depending onthe Result value. So, how do I share this variable Result?
Any help will be appreciated

Please help me!!!!!!!!!!!

sairaj:

Hi all, I am a newbie to asp.net web applications.
My web application consists of various aspx pages. The Default.aspx page is made up of frames, where each of the frames's source is an aspx page. It consists of 3 frames. The first frame's source page is First.aspx. The second frame's source page is Second.aspx. The third's is Third.aspx.Is it correct to have like this. I have made the source of each frame as an aspx page because I want to display the items in each frame using Repeater control.
The application's start page(which is StartPage.aspx) takes the query string, calculates the result and sets the value to a variable named Result.
Now I want to use this Result object in the source aspx pages of each frame. I want to load each of the frames with some values, depending on the Result value. So, how do I share this variable Result?
Any help will be appreciated Please help me!!!!!!!!!!!


Regarding the frames, you can use them if you want. However, many developers avoid them because they can be difficult to manage, they are not easily indexed by search engines, they are not supported in some browsers, and so on. Using User Controls and/or Master Pages can almost always replace the use of frames.

Regarding the values, you can read/write data to an object called "Session", which is available on every page, like this...


private void TestWriteToSession()
{
this.Session["MyKey1"] = "some string value";
this.Session["MyKey2"] = 1;
}

private void TestReadFromSession()
{
string myValue1 = Convert.ToString(this.Session["MyKey1"]);
int myValue2 = Convert.ToInt32(this.Session["MyKey2"]);
}

There are many ways to share data. Using Session is just one.

Note that Session is a decent choice under certain conditions, such as -- when it is used to store built-in data types (string, int, double, etc) AND when the data is not too large in terms of storage size-- that is, it is not a good idea to store a string that has 1-million characters in it into Session.

HTH.

Thank you.

-- Mark Kamoski


Hi Mark,

I think I will be more specific to what my application should support. I am trying to write a clustering search web application. So the start page consists of a TextBox and a search button. After the user enters the query into the TextBox, I extract the query, get the results and cluster them into various groups. Now, I want to display the cluster labels on the left side of the page, and the right side should contain all the results. Also, when the user clicks on any cluster label on the left side, the right side should be loaded with the snippets belonging to that particular cluster. Also, the TextBox and the Search button should be there on top of the page, so that users can enter the next query string. Can you give me a suggestion for the approach that I should take.

Thank you


I agree with Mark that you want to avoid frames if possible. for the application that you are talking about I think having a page that consists of several user controls will work very well. One user control would contain the search input, button and search logic. A second user control would contain the consolidated search results The third would display the result details. This could all be perform without the use of controls, but by spliting it into user controls it offers flexibility moving forward.

Here are couple links that you might find useful

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/masterpages/default.aspx

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/userctrl/default.aspx


Here are some links that may help:
How to: Pass Values Between ASP.NET Web Pages

ASP.NET State Management Recommendations

sairaj:

Hi Mark,

I think I will be more specific to what my application should support. I am trying to write a clustering search web application. So the start page consists of a TextBox and a search button. After the user enters the query into the TextBox, I extract the query, get the results and cluster them into various groups. Now, I want to display the cluster labels on the left side of the page, and the right side should contain all the results. Also, when the user clicks on any cluster label on the left side, the right side should be loaded with the snippets belonging to that particular cluster. Also, the TextBox and the Search button should be there on top of the page, so that users can enter the next query string. Can you give me a suggestion for the approach that I should take.

Thank you

I would suggest doing it just as sairaj mentions above-- by using User Controls.

There are other ways too; but, User Controls are pretty easy, very flexible, and will suit the requirements that you have outlined.

HTH.

Thank you.

-- Mark Kamoski

Sharing database connection with controls

Hi. I'm writing controls that have to query the database, and it
bothers me that I might have several of these controls on a page that
each create, open, and close their own connection with the same
connection string, and the page class has a connection object too.

I'm using the code-behind way of doing things, and I considered
leaving the database connection open as a field in the page's class
and somehow letting the controls use that same connection, but then I
want to be sure that every page does have a database connection
object.

What is the best way of sharing the database connection object between
the page's class and the controls' classes? Can I create a connection
object on the page automatically some way in global.asax?

Thanks,
Mike PIIIf you use exactly the same connection string, asp.net (rather ado.net for
this matter) will automatically share the same connection between all your
objects. This is called "connection pooling". The best practice is to put
the code to open connection just before the database access operation and to
close it as soon as you finish the operation. Ado.net will take care about
actual opening and closing connections. Trying to keep connection open will
result in degrading performance.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Mike P2" <sumguyovrthar@.gmail.comwrote in message
news:1180839750.113116.100420@.g4g2000hsf.googlegro ups.com...

Quote:

Originally Posted by

Hi. I'm writing controls that have to query the database, and it
bothers me that I might have several of these controls on a page that
each create, open, and close their own connection with the same
connection string, and the page class has a connection object too.
>
I'm using the code-behind way of doing things, and I considered
leaving the database connection open as a field in the page's class
and somehow letting the controls use that same connection, but then I
want to be sure that every page does have a database connection
object.
>
What is the best way of sharing the database connection object between
the page's class and the controls' classes? Can I create a connection
object on the page automatically some way in global.asax?
>
Thanks,
Mike PII
>


"Mike P2" <sumguyovrthar@.gmail.comwrote in message
news:1180839750.113116.100420@.g4g2000hsf.googlegro ups.com...

Quote:

Originally Posted by

I considered leaving the database connection


As Eliyahu mentions, this is one of the worst things you can do in terms of
performance and scalability of an ASP.NET app...

--
http://www.markrae.net
On Jun 3, 3:46 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@.mMvVpPsS.orgwrote:

Quote:

Originally Posted by

If you use exactly the same connection string, asp.net (rather ado.net for
this matter) will automatically share the same connection between all your
objects. This is called "connection pooling". The best practice is to put
the code to open connection just before the database access operation and to
close it as soon as you finish the operation. Ado.net will take care about
actual opening and closing connections. Trying to keep connection open will
result in degrading performance.
>
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net


Cool. So is the stuff in the System.Data.SqlClient Ado.net? Or do I
have to use those OLE classes?

Thanks for your replies,
Mike PII
System.Data.SqlClient is fine.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Mike P2" <sumguyovrthar@.gmail.comwrote in message
news:1180880364.258338.178210@.p47g2000hsd.googlegr oups.com...

Quote:

Originally Posted by

On Jun 3, 3:46 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@.mMvVpPsS.orgwrote:

Quote:

Originally Posted by

>If you use exactly the same connection string, asp.net (rather ado.net
>for
>this matter) will automatically share the same connection between all
>your
>objects. This is called "connection pooling". The best practice is to put
>the code to open connection just before the database access operation and
>to
>close it as soon as you finish the operation. Ado.net will take care
>about
>actual opening and closing connections. Trying to keep connection open
>will
>result in degrading performance.
>>
>--
>Eliyahu Goldin,
>Software Developer & Consultant
>Microsoft MVP
>[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net


>
Cool. So is the stuff in the System.Data.SqlClient Ado.net? Or do I
have to use those OLE classes?
>
Thanks for your replies,
Mike PII
>

Sharing database connection with controls

Hi. I'm writing controls that have to query the database, and it
bothers me that I might have several of these controls on a page that
each create, open, and close their own connection with the same
connection string, and the page class has a connection object too.
I'm using the code-behind way of doing things, and I considered
leaving the database connection open as a field in the page's class
and somehow letting the controls use that same connection, but then I
want to be sure that every page does have a database connection
object.
What is the best way of sharing the database connection object between
the page's class and the controls' classes? Can I create a connection
object on the page automatically some way in global.asax?
Thanks,
Mike PIIIf you use exactly the same connection string, asp.net (rather ado.net for
this matter) will automatically share the same connection between all your
objects. This is called "connection pooling". The best practice is to put
the code to open connection just before the database access operation and to
close it as soon as you finish the operation. Ado.net will take care about
actual opening and closing connections. Trying to keep connection open will
result in degrading performance.
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Mike P2" <sumguyovrthar@.gmail.com> wrote in message
news:1180839750.113116.100420@.g4g2000hsf.googlegroups.com...
> Hi. I'm writing controls that have to query the database, and it
> bothers me that I might have several of these controls on a page that
> each create, open, and close their own connection with the same
> connection string, and the page class has a connection object too.
> I'm using the code-behind way of doing things, and I considered
> leaving the database connection open as a field in the page's class
> and somehow letting the controls use that same connection, but then I
> want to be sure that every page does have a database connection
> object.
> What is the best way of sharing the database connection object between
> the page's class and the controls' classes? Can I create a connection
> object on the page automatically some way in global.asax?
> Thanks,
> Mike PII
>
"Mike P2" <sumguyovrthar@.gmail.com> wrote in message
news:1180839750.113116.100420@.g4g2000hsf.googlegroups.com...

> I considered leaving the database connection
As Eliyahu mentions, this is one of the worst things you can do in terms of
performance and scalability of an ASP.NET app...
http://www.markrae.net
On Jun 3, 3:46 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@.mMvVpPsS.org> wrote:
> If you use exactly the same connection string, asp.net (rather ado.net for
> this matter) will automatically share the same connection between all your
> objects. This is called "connection pooling". The best practice is to put
> the code to open connection just before the database access operation and
to
> close it as soon as you finish the operation. Ado.net will take care about
> actual opening and closing connections. Trying to keep connection open wil
l
> result in degrading performance.
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
Cool. So is the stuff in the System.Data.SqlClient Ado.net? Or do I
have to use those OLE classes?
Thanks for your replies,
Mike PII
System.Data.SqlClient is fine.
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Mike P2" <sumguyovrthar@.gmail.com> wrote in message
news:1180880364.258338.178210@.p47g2000hsd.googlegroups.com...
> On Jun 3, 3:46 am, "Eliyahu Goldin"
> <REMOVEALLCAPITALSeEgGoldD...@.mMvVpPsS.org> wrote:
> Cool. So is the stuff in the System.Data.SqlClient Ado.net? Or do I
> have to use those OLE classes?
> Thanks for your replies,
> Mike PII
>

Sharing Development

My company is using Source Safe to check files in and out during initial development. However, we cannot find a way to work on the same projects at the same time because our solution and project files are overwriting each other and causing problems. Does anyone know of a way for two people to work on different pages of the same solution at the same time and not worry about conflicts in the solution and project files?

To be more blunt, is it possible for mutliple people to work on the same project and share solution and project level files? I find this to be the biggest problem with ASP.NET development.Hi,

we currently develop with 3 coders on the same asp.net project while the business and data tiers are written by some other developers. We use source safe and don't have any problem. What the person who's responsible for the VSS databases did was that he turned of multiple checkouts so that only one person can check out 1 file at the same time. So we work independent on different web forms and user controls that we check in on a regular basis.

Grz, Kris.
Micro soft has a paper on Team development with .Net and VSS... I don't have the link handy...

A short answer to your question is... Only check out the SLN file when you need to... Or don't ever put the sln file into source safe... then each developer can have their own solution set up on their local machine...
I guess I need to find out more about what the solution file does. Every time we start to use different solution files, we can never get the project back together correctly. New files are always missing and we get various error messages. Do you happen to know when the solution of project files need to be changed for a project? I would assume when adding files, but what about compiling the project to debug?
It's not that we have an issue with sharing individual files, it's all the overhead files (solution, project, etc.) that seem to mess our project up when used by different people. For example, I need these files if I'm adding new files and assemblies to the project (I assume at least.) If another developer is making changes and has a separate solution file on his machine, how would we get the correct set of files back together? Do you not run into problems using different sets of these types of files?
We have the solution and project files stored in vss but have the policy that anyone who uses it, when adding a new webform, first has to do a rebuild so that the added code doesn't break the build, and then checks it in asap. Or else she/he will hear it from the others :-) .

Grz, Kris.
From the top of my head...

Solution files store info about which projects belong to the solution...

Project files store info about which files(vb, aspx, ...) belong to the project...

Sharing DB connection

How can I share DB connections between many pages?Hi,

why would you need to? Do you have some sort of transaction which should
last over multiple pages?

Anyways, connection pooling in .NET is one reason why you shouldn't try to
share connections, but instead use them so that open the conn late and close
as soon as possible and when you need a another conn, instantiate such when
needed.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
You should not. This is not your grandfather's ASP. ASP.Net uses Connection
Pooling to solve the problems that ASP had. With ASP.Net, you should open
and close Connections as quickly as possible.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"David Dvali" <david_dvali@.hotmail.com> wrote in message
news:eSBds$2hFHA.2444@.tk2msftngp13.phx.gbl...
> How can I share DB connections between many pages?

Sharing docs

Hello All,

Is there a simple way to share documents on a web site so that many people can update it online?

Thanks,

Look at some of the Office web tools, and especially at using Sharepoint. Pretty much designed for sharing documents, including version, checkin/checkout, approval of changes, etc.

Jeff

Sharing DLLs among multiple ASP.NET Apps

Hi,

I'm fairly new to using ASP.NET, so please bare with me. I'm writing
some classes that provide a business layer functions. But these
functions need to be accessed from a series of websites hosted on IIS.
I know normally you would put the DLL inside the web app's /bin
directory. But that seems rather wasteful to copy the same DLLs over
and over again into 12 bin directories for the 12 sites that will be
hosted. Is there a better way to make the DLLs globally available?
Thanks.

Xin LiThe Global Assembly Cache is your friend (assuming your DLLs are .NET
assemblies - or can be wrapped inside of .NET Assemblies). Here's more:
http://msdn.microsoft.com/library/d...semblycache.asp

"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.c om...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li
I agree with Jeremy.
Here's more links on the GAC for you:
http://msdn.microsoft.com/library/d...semblyCache.asp
http://www.aspzone.com/articles/john/GAC/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.c om...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li
I agree with Jeremy.
Here's more links on the GAC for you:
http://msdn.microsoft.com/library/d...semblyCache.asp
http://www.aspzone.com/articles/john/GAC/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.c om...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li

Sharing DLLs among multiple ASP.NET Apps

Hi,
I'm fairly new to using ASP.NET, so please bare with me. I'm writing
some classes that provide a business layer functions. But these
functions need to be accessed from a series of websites hosted on IIS.
I know normally you would put the DLL inside the web app's /bin
directory. But that seems rather wasteful to copy the same DLLs over
and over again into 12 bin directories for the 12 sites that will be
hosted. Is there a better way to make the DLLs globally available?
Thanks.
Xin LiThe Global Assembly Cache is your friend (assuming your DLLs are .NET
assemblies - or can be wrapped inside of .NET Assemblies). Here's more:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconglobalassemblycache.asp
"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.com...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li
I agree with Jeremy.
Here's more links on the GAC for you:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxconInstallingToGlobalAssemblyCache.asp
http://www.aspzone.com/articles/john/GAC/
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.com...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li

Sharing DLL between threads

Hi:
I've a third party DLL (not a .NET class library PE) which I use using
DllImport attribute in my application running in multiple threads invoking
different methods of the same DLL.
The memory usage of the application is shooting to 1GB in just 30 minutes.
It goes till it's 1.4GB after which I get OutOfMEmory exceptions. If I don't
use the DLL, my memory stays put at 100MB.
I tried freeing the DLL using FreeLibrary but after few seconds I am getting
"Object reference not set to an instance of an object" while accessing the
methods of the DLL.
How can I ensure that only one copy of the DLL per thread is in my
application memory and that the DLL is unloaded when it's no longer used by
any of the threads?
BTW, my application is an ASP.NET web service but this has nothing to do
with the statelessness of a webmethod because I am spawning and running the
threads in the background at application level.
Thanks,
Ramif you use standart PInvokde mechanism: DON'T EVER FREE your LIBRARY
amd it can't be unloaded.
but don't wory, there is, already, one single instance of the DLL in memory
for all thread (of all process!!!)
if you memory goes that up, it's very likely to be a bug in your application
DLL used with standart mechanism won't upload and DON'T EVER call a function
in a FREED Library.
That will crash your program instantly or, worst, cause weird, mysterious,
alien bugs...
On the other hand, with .NET 2.0 you could transform IntPtr (of a function
pointer) to a delegate.
So you could used LoadLibrary/FreeLibrary & GetProcAddress.
But even then, NEVER call into a FREED library.
"Ram P. Dash" <rampr2@.hotmail.com> wrote in message
news:oCvle.1050$MI4.716@.newsread2.news.pas.earthlink.net...
> Hi:
> I've a third party DLL (not a .NET class library PE) which I use using
> DllImport attribute in my application running in multiple threads invoking
> different methods of the same DLL.
> The memory usage of the application is shooting to 1GB in just 30 minutes.
> It goes till it's 1.4GB after which I get OutOfMEmory exceptions. If I
> don't use the DLL, my memory stays put at 100MB.
> I tried freeing the DLL using FreeLibrary but after few seconds I am
> getting "Object reference not set to an instance of an object" while
> accessing the methods of the DLL.
> How can I ensure that only one copy of the DLL per thread is in my
> application memory and that the DLL is unloaded when it's no longer used
> by any of the threads?
> BTW, my application is an ASP.NET web service but this has nothing to do
> with the statelessness of a webmethod because I am spawning and running
> the threads in the background at application level.
> Thanks,
> Ram
>
Thanks,
However when I looked at the ProcessModuleCollection somewhere in my code, I
saw the same DLL appear three times in the collection my test environment
(where close to 5 threads run at a time). Doesn't that tell that three
copies of the same DLL is in my application memory?
Thanks,
Ram
"Lloyd Dupont" <net.galador@.ld> wrote in message
news:uh8fbgmYFHA.2380@.tk2msftngp13.phx.gbl...
> if you use standart PInvokde mechanism: DON'T EVER FREE your LIBRARY
> amd it can't be unloaded.
> but don't wory, there is, already, one single instance of the DLL in
memory
> for all thread (of all process!!!)
> if you memory goes that up, it's very likely to be a bug in your
application
> DLL used with standart mechanism won't upload and DON'T EVER call a
function
> in a FREED Library.
> That will crash your program instantly or, worst, cause weird, mysterious,
> alien bugs...
>
> On the other hand, with .NET 2.0 you could transform IntPtr (of a function
> pointer) to a delegate.
> So you could used LoadLibrary/FreeLibrary & GetProcAddress.
> But even then, NEVER call into a FREED library.
>
> "Ram P. Dash" <rampr2@.hotmail.com> wrote in message
> news:oCvle.1050$MI4.716@.newsread2.news.pas.earthlink.net...
invoking
minutes.
>
mmh... you makes me wonder.
I haven't used this window much so I'm not sure, but do you have an address
for the DLL, I'll bet, it's the same address everytime.
Theoritically DLL are loaded once and there is a system wide counter
incremented every time they are used and decremented evrytime they are
freed.
normally, all what a process could do is increment this counter.
it's one of the major concept of the DLL, so I kind of doubt XP bug on
this...
"Ram P. Dash" <rampr2@.hotmail.com> wrote in message
news:uoD7Q3sYFHA.3356@.TK2MSFTNGP15.phx.gbl...
> Thanks,
> However when I looked at the ProcessModuleCollection somewhere in my code,
> I
> saw the same DLL appear three times in the collection my test environment
> (where close to 5 threads run at a time). Doesn't that tell that three
> copies of the same DLL is in my application memory?
> Thanks,
> Ram
> "Lloyd Dupont" <net.galador@.ld> wrote in message
> news:uh8fbgmYFHA.2380@.tk2msftngp13.phx.gbl...
> memory
> application
> function
> invoking
> minutes.
>
1) What sort of a dll is this? If a C++ or similar, are you sure it releases
it's memory properly after use?
I had such a problem a while ago... forgot to clean up the c++ dll from my
C# interop wrapper. When you describe your memory leaks, this is the type of
problem I would put my money on.
2) I'm not entirely sure you can freely multithread anything you may want
to. Are you sure the component is thread safe and that the results you're
getting back are ok?
3) In general you could wrap your dll into a managed wrapper that runs as an
EnterpriseServices (COM+) server.
This way it runs out-of process of the main application, you can pool the
objects, and you get object lifetime & recycling control (you can set the
memory limits; e.g. if the mem usage of the object reaches xx megs, kill it,
and use a freshly instantiated object with next call; or put a number of
calls limit on it - the object gets recycled every xx calls).
This is the way to go when you have rogue unmanaged third-party dlls that
don't work quite properly. Sure, you lose some performance, but gain a lot
of stability.
Win Xp or w2k3 are recommended, though, as they use COM+ 1.5 which offers
more features.
Regards,
Sigmund Jakhel
"Ram P. Dash" <rampr2@.hotmail.com> wrote in message
news:oCvle.1050$MI4.716@.newsread2.news.pas.earthlink.net...
> Hi:
> I've a third party DLL (not a .NET class library PE) which I use using
> DllImport attribute in my application running in multiple threads invoking
> different methods of the same DLL.
> The memory usage of the application is shooting to 1GB in just 30 minutes.
> It goes till it's 1.4GB after which I get OutOfMEmory exceptions. If I
> don't use the DLL, my memory stays put at 100MB.
> I tried freeing the DLL using FreeLibrary but after few seconds I am
> getting "Object reference not set to an instance of an object" while
> accessing the methods of the DLL.
> How can I ensure that only one copy of the DLL per thread is in my
> application memory and that the DLL is unloaded when it's no longer used
> by any of the threads?
> BTW, my application is an ASP.NET web service but this has nothing to do
> with the statelessness of a webmethod because I am spawning and running
> the threads in the background at application level.
> Thanks,
> Ram
>

Sharing folders required?

Read the steps I followed, and I've got a simple question at the end:

1. In IIS, I created a virtual directory, http://localhost/testing1 in

C:\Documents and Settings\mendhak\My Documents\Visual Studio Projects

2. In VS.NET I created a new Web Project and specified http://localhost/testing1

3. I created an extremely simple page (a page with a button on it), and when I tried to view it, I got "security permission" errors.

4. I went to C:\Documents and Settings\mendhak\My Documents\Visual Studio Projects and shared testing1 (like a network share) and when I refreshed the erroneous browser, it worked fine.

My question is: Is this sharing of folders necessary?FROGBUMP
You don't have to share it with all. You just need to give the asp.net account access to that folder. This is just to make sure security is in place. If they didn't do this, that asp.net account could do anything on the machine...which isn't good if a hacker hacks your app and makes it do things it wasn't designed to do.
OK. I'll check this tonight and get back to this thread if there's a problem.
Lets make this a little more clear, you still have to web share the folder, otherwise it isn't going to work, but that should be taken care of when you map the folder as a virtual folder in IIS.
No luck. Here's the error page I get:

(attached .txt file, rename to .html)
Since you are doing it in your Document and Settings, it would need to be shared I believe, so yes, you would have to share it because that folder is only for you on that computer unless you specifically set the permissions otherwise. Other users are not supposed to be able to get to your documents.
Thanks a lot for the responses!

BTW, I also did a little experiment.

I uninstalled and reinstalled Visual Studio, and after the reinstall, I noticed that C:/WEB was shared!

So to avoid all the hassle, I created a folder, C:/WEB/ASPDOTNET/, and use that for all the web applications that it'll be creating.

Much appreciated! :afrog:
Mendhak,

I recently installed the Microsoft .net example tutorials. I tried to make the tutorial public but I had similar problems to you.

In the end I created the virtual directory in IIS for QuickStart (or whatever alias you are using) and in Windows explorer I shared the folder for default IUSR_xxxxxx.

This should work for you.

But I still have a problem when I run some tutorials that arent security related, some trace messages appear -

My pages are on http://www.adoanywhere.com/dotnet

Feel free to share any knowledge, this is new to me..

Sharing folders bettween 2 differnet Asp.net application

Hi All,
I am trying to share folders between 2 asp.net application for saving and accessing image from the shrared folder.
Here is the situvation i got:
I have "Application1" has sub folder "sharedImages". Application 1 uses just disply images inside the subfolders.
"Application2" is kind of back office. Its need to upload image into Application1 Subfolder SharedImages.
Can some one please help me.
Thanks in Advance
SivaWhat you want to do exactly?
Need a code to help you in upload? or u need to display the pictures inside the shared folder?
regards

Sharing GIFs (assets) Amongst Multiple Apps

I wrote a Web app and someone else now wants a copy of it (and run it on the
same server)... and eventually others may want copies as well. Rather than
copying all of the gif/assets to each app's folder structure I was wondering
what I can to to enable all copies of the application on the server to share
the same assets folder.
thanksCreate the same virtual directory in every IIS application on the server
pointing to the same folder.
cheers,
mortb
"RC" <a@.b.com> wrote in message
news:ulnB%23l7xEHA.2624@.TK2MSFTNGP11.phx.gbl...
>I wrote a Web app and someone else now wants a copy of it (and run it on
>the
> same server)... and eventually others may want copies as well. Rather than
> copying all of the gif/assets to each app's folder structure I was
> wondering
> what I can to to enable all copies of the application on the server to
> share
> the same assets folder.
> thanks
>

Sharing GIFs (assets) Amongst Multiple Apps

I wrote a Web app and someone else now wants a copy of it (and run it on the
same server)... and eventually others may want copies as well. Rather than
copying all of the gif/assets to each app's folder structure I was wondering
what I can to to enable all copies of the application on the server to share
the same assets folder.

thanksCreate the same virtual directory in every IIS application on the server
pointing to the same folder.

cheers,
mortb

"RC" <a@.b.com> wrote in message
news:ulnB%23l7xEHA.2624@.TK2MSFTNGP11.phx.gbl...
>I wrote a Web app and someone else now wants a copy of it (and run it on
>the
> same server)... and eventually others may want copies as well. Rather than
> copying all of the gif/assets to each app's folder structure I was
> wondering
> what I can to to enable all copies of the application on the server to
> share
> the same assets folder.
> thanks

Sharing functions between controls

I am building an application with custom controls. All of these controls share common features and interface objects (like an MS window does: close, minimize, etc). I wanted to know if there was a way to build a template that would hold all of the shared functions and interface objects.

Thanks for your help.

Build a base class, and have all other classes inherit that one. All child classes will have the same functionality unless they override the parent's function.


Create a template base class which inherits from system.Web.UI.Page, write all your functionalities in this base class. Now in your custom control inherits the template base class.


That sounds like exactly what I was looking for. I am relatively new to the base class / inherit process so please forgive me if I ask any dumb questions.

1. I create aclass filein my App_Code folder called ControlTemplate.cs.
2. I use ControlTemplate : System.UI.Page so it inherits from Page.
3. I have my controls use MyControl : ControlTemplate so it inherits from Control Template.

Does that sound right? Would I have to program the border and navigation buttons on every control or is there a way to create those within the template? How would I tell the template where the control body should be displayed?

Thanks for all of your help.


those 3 steps are correct. To make it so that the ControlTemplate cannot be created directly using new (i.e., a child control must be created), make it an abstract class.

You can use a master page with your controls to supply the border and navigation buttons, and you can apply the masterpage in either the web.config (to apply it to all pages in the application) or you can override the MasterPageFile property of the ControlTemplate (set this to return the file name of the master page). This property will then be inherited by all child classes.


That is very interesting. I have not worked with abstract classes before so I am not familiar with that process.

I am currently using a master page for the entire page layout. Within a content page is where these custom controls will be found. Can I have master pages setup for each control? That is exactly what I need if it's possible. Can you provide any example of how I would implement this?

Thank you for all of your help.


Can I have master pages setup for each control?

Yes, of course, you can, but the purpose of the master page is mostly for consistent layout (look and feel). If you just want to share the UI code (html makeup), that's probably what you are look for, but if you want to share some other functionalities of different page, like security check, or more business logic, then it makes more sense to create a base class to share those code.

Also, please take a look at this : http://www.developer.com/net/asp/article.php/3605646

HTH


That base class is a great idea. Thank you for the link.

When I create a custom control the "Select Master Page" checkbox is greyed out. How do I specify the master page for the custom control?


I simply don't like Enable property which grey out the Label. What you can do for the checkbox is to override the Enable property and if it is set to true in the Render Method put two images like one for checked and for uncheck. In this manner your its always readable.
You have to make sure to maintain the view state for check one if you want to do some thing with it.
You can follow same for any control which have enable property.


If you are only going to be using a single masterpage (not changing dynamically), add the MasterPage property in the <%@. Page > directive:

<%@. Page MasterPageFile="~/MasterPage.master" %>

Don't forget to keep the rest of the attributes, though.

The easiest way to configure the page is to add a regular web form to your app, and select the masterpage. Then, in the code behind, change the "Inherits System.Web.UI.Page" to make the page inherit from your custom control.


Wouldn't it be <%@. Control instead of <%@. Page? Can I have a Page that inherits UserControl?


I have done some testing and found that <%@. Control does not allow a MasterPageFile. When I created an ASPX file and link that as the control I got an error that it didn't inherit UserControl. I changed it to : UserControl and now I get the following error.

CS0115: 'ASP.test_controls_testcontrol2_aspx.GetTypeHashCode()': no suitable method found to override

Any suggestions?


You said you were creating a custom control that inherited from page. Why did you switch to a usercontrol? You should create your custom page in a class, not in a .ascx user control.


Sorry for the confusion. mihirpathak said I should inherit from page, but I am not sure that is the proper direction for what I'm looking for. All I want is to have multiple custom controls all share a similar template and functions. I want something to wrap around my custom controls the same way a master page wraps around a content page.


Ah. If the design of the "wrapping control" is going to be the same in all control types, then I would create a control for the wrapping control. Then the base class for your other controls should be a composite control that uses this wrapping control as the outer-most container, and add all the other controls inside of it.

Sharing functions across files?! (new to .NET)

I'm not at all new to ASP, but ASP.NET both amazes me and confuses me totally.

In normal ASP every page I made included a theme.asp file that would generate the site design. I have now converted that to User Controls. No problems there - so far... :)

My problem is that when I at the time included the theme.asp file it contained common functions, const's etc. that I used in various pages. Now in ASP.NET i cannot include files just like that. I will have to have the exact same function in every aspx file. Can't they share some how? (well i know they can, but how?)

Sorry for asking silly questions but I am totally green ragarding ASP.NETstick the function in class and call the class like you would any other class/object.
I apologize for my lack of brain power... ;)

Can you tell me how exactly I would do that?
you would want to start a component project and write your funtions in the class using the proper oop techniques
I assume you presume I am using Visual Studio.NET right? Guess what - I'm not.
Besides, with all due respect, your reply was good nothing for me... :(
Do you even know what you are talking about? heh
well then I would suppose you would just want to write a code behind page and there is proablly some sort of special command that is different to then the regular complile but i wouldnt know but your code should look like

public class jerk
function beajerk() as string
return "I am a jerk"
end function
end class

Next time you could be a little nicer when responding to someone who is trying to help ya out oh yeha you can also add properties to you class but what ever
Ok, I'm sorry. I was rude. Actually I appreciate that you try to help me. It's just that I have been working on this for ages and have achieved almost nothing. Therefore I'm not in my best mood.

My apologies...!
Code behind can be compiled dlls or compiled on the fly - vs.net automatically creates projects with code behind for every single page that will be compiled. It didn't take me long to start looking for alternatives.
For your code behind to compile on the fly then you use the src attribute instead of codebehind so that your page reads:-

<%@. page arc="webform1.aspx.vb" inherits="webform1" %>

where the file is webform1.aspx.vb and the class name is webform1.
This is fine but does not allow you to declare other files to compile on the fly so that just one vb file could contain all the functions you want to use on every page. A typical example using vs.net to compile a project would be a class with a series of shared functions.
To do this with aspx files that compile on the fly you have to compile your shared functions class. I could not find any other way of doing it. The only other alternative is to include the shared functions class in all .vb files which to me is innefficient.
You say you are not using vs.net but you must be using the .net sdk which contains the compilers. vs.net is just an ide. So you write your shared functions file as normal and compile it using vbc.exe to a dll. Then copy it to the bin folder of your webproject. Then use the imports statement in your vb files for each page to import a reference to it.
An example class might be like one I am using. Here it is with one function to get my connection string from my web.config file:-

Import System.Web.UI 'example - other imports may be required
Public Class SharedFuncs
Public Shared Function ConnStr(ByVal wpage As Page) As String
If wpage.Server.MachineName = "localcomputername" Then
Return CStr(ConfigurationSettings.AppSettings("LocalConnString"))
Else
Return CStr(ConfigurationSettings.AppSettings("WebConnString"))
End If
End Function

Public Shared Function ConnStr(ByVal wcontrol As UserControl) As String
If wcontrol.Server.MachineName = "localcomputername" Then
Return CStr(ConfigurationSettings.AppSettings("LocalConnString"))
Else
Return CStr(ConfigurationSettings.AppSettings("WebConnString"))
End If
End Function
End Class

My class contains one overloaded function (the same function but 2 versions taking in the first case a webform reference and in the second case a usercontrol reference) which will return my connection string depending on whether I'm working on my home machine or it is live on my host.
Now with this code saved as sharedfuncs.vb I can compile it:-

vbc target:library /out:sharedfuncs.dll sharedfuncs.vb

assuming your dos box has a path to the vbc.exe file which is in the framework folder normally under the windows directory you will get the sharedfuncs.dll file. Now copy this file to the bin directory of you web project (create the bin folder if necessary) and it is ready to use.
A Webform's code file for example webform1.aspx.vb now needs an import statement at the very start of the code:-

Imports sharedfuncs.dll

Public Class WebForm1
Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim conn as new system.data.sqlclient.sqlconnect(sharedfuncs.ConnStr(me))
End Sub

End Class

And there you have an example of called the shared function to create a sql server connection object.
Sorry for being so cryptic. :D Class usage is a very important thing to know. You are dead in the water without it in .NET.

hope Musician helped you.
Thanks alot!

I appreciate the hard work you did for me there :-)
You should start a personal tutorial ordering company hehe

I will try it and get back to you if I can't manage
Funny you should mention it - my new dotnet website will be launching soon.
Sounds very cool! Wish I had the time (and knowledge! heh) to do that...

Let me know when it's up. I will use it for sure...

Sharing images with multiple web sites

Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.Use an absolute URL, such as
http://yourdomain.com/yourimageweb/images/image.jpg
--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.

"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:DCEC13E6-7A27-4852-A6A8-9CAC87F66E85@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


The absolute URL would change from development to staging to production, so I
would then have to go and change all reference before deployment from one
platform to another. I don't like this idea.

"Kevin Spencer" wrote:

Quote:

Originally Posted by

Use an absolute URL, such as
http://yourdomain.com/yourimageweb/images/image.jpg
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
>
Sequence, Selection, Iteration.
>
>
"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:DCEC13E6-7A27-4852-A6A8-9CAC87F66E85@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


>
>
>


My personal preference would be likely still just to automate the copy using
a tool such as "robocopy" (downloable from MS, allows to synchronize
directories) either on demand or at logon time depending on the update
frequency (are they updated so often ?) or as part of the build process.

The application could be also written to accomodate both scenarios (the
location could be configurable, the application could redirect to an
alternate location in dev mode).

You could also try a Windows admin group (you have little know options such
as hardlinks or mount points though I believe it wouldn't work on a network
share).

Good luck
--
Patrice

"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.coma crit dans le message
de news: DCEC13E6-7A27-4852-A6A8-9CAC87F66E85@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


I would think this would get very messy because we have 40 web applications
that utilize the same images. A virtual directory would be beautiful, but
unfortunately you can't do that with the web server embedded in VS.NET 2005.
Another problem would be one of source control. These web sites would be a
mixture of source controlled and unbound files. I think this too would get
very confusing.

"Patrice" wrote:

Quote:

Originally Posted by

My personal preference would be likely still just to automate the copy using
a tool such as "robocopy" (downloable from MS, allows to synchronize
directories) either on demand or at logon time depending on the update
frequency (are they updated so often ?) or as part of the build process.
>
The application could be also written to accomodate both scenarios (the
location could be configurable, the application could redirect to an
alternate location in dev mode).
>
You could also try a Windows admin group (you have little know options such
as hardlinks or mount points though I believe it wouldn't work on a network
share).
>
Good luck
--
Patrice
>
"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.coma écrit dans le message
de news: DCEC13E6-7A27-4852-A6A8-9CAC87F66E85@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


>
>
>


Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Jason Camp" wrote:

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.


Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:

Quote:

Originally Posted by

Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter
>
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
>
>
>
>
"Jason Camp" wrote:
>

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to security
policy, we would like to use the internal web server baked into VS.NET 2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put them. I'm
not able to create a virtual directory in "Cassini", so that's not a viable
solution. I also don't want to copy all the shared images under an \images
directory under each web application as this will be an administrative and
maintenance nightmare. We could store these images on a separate server and
reference them via HTTP, but that won't be a nice solution from a deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so hopefully
you will have some guidance on this issue. I must be overlooking the obvious.


Yes, as long as your web.config at design time is pointing to the actual
locations of the images.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.

"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:11CE38AC-6636-4CEE-90AF-F00E0279A918@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Will this solution display the images at design time?
>
"Peter Bromberg [C# MVP]" wrote:
>

Quote:

Originally Posted by

>Put a "baseImageUrl" appSettings key in the web.config.
>All your image urls would have this prepended. When you "move" the app,
>the setting can be changed in only one place.
>Peter
>>
>--
>Co-founder, Eggheadcafe.com developer portal:
>http://www.eggheadcafe.com
>UnBlog:
>http://petesbloggerama.blogspot.com
>>
>>
>>
>>
>"Jason Camp" wrote:
>>

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


Would you please give me a code snippit on this? If this works at design time
I'm ready to roll.

"Kevin Spencer" wrote:

Quote:

Originally Posted by

Yes, as long as your web.config at design time is pointing to the actual
locations of the images.
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
>
Sequence, Selection, Iteration.
>
>
"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:11CE38AC-6636-4CEE-90AF-F00E0279A918@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:

Quote:

Originally Posted by

Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the app,
the setting can be changed in only one place.
Peter
>
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
>
>
>
>
"Jason Camp" wrote:
>
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


>
>
>


Hi Jason,

Here's an example from an ASP.Net web application I have worked on:

<add key="ImagePath" value="http://www.airtraveler.com/airtraveler"/>

This is combined with the image file name in the app to create the URL of
the images in the app.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.

"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:4255FE80-2457-4A80-A26B-C2E1F5797810@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Would you please give me a code snippit on this? If this works at design
time
I'm ready to roll.
>
"Kevin Spencer" wrote:
>

Quote:

Originally Posted by

>Yes, as long as your web.config at design time is pointing to the actual
>locations of the images.
>>
>--
>HTH,
>>
>Kevin Spencer
>Microsoft MVP
>Professional Chicken Salad Alchemist
>>
>Sequence, Selection, Iteration.
>>
>>
>"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
>news:11CE38AC-6636-4CEE-90AF-F00E0279A918@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Will this solution display the images at design time?
>
"Peter Bromberg [C# MVP]" wrote:
>
>Put a "baseImageUrl" appSettings key in the web.config.
>All your image urls would have this prepended. When you "move" the
>app,
>the setting can be changed in only one place.
>Peter
>>
>--
>Co-founder, Eggheadcafe.com developer portal:
>http://www.eggheadcafe.com
>UnBlog:
>http://petesbloggerama.blogspot.com
>>
>>
>>
>>
>"Jason Camp" wrote:
>>
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into
VS.NET
2005.
The problem that I am currently running into is that we have many
web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an
administrative
and
maintenance nightmare. We could store these images on a separate
server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between
development,
staging and our production environments. If we use <%=location%in
the
tags
to find the location at runtime, then the images won't show up in
the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


>>
>>
>>


As you wish... It left you with the other option, i.e. just have the
application get the files from a configurable location...

--
Patrice

"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.coma crit dans le message
de news: 3A71276D-8087-49F6-8E8E-DE482BF5E5E6@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

>I would think this would get very messy because we have 40 web applications
that utilize the same images. A virtual directory would be beautiful, but
unfortunately you can't do that with the web server embedded in VS.NET
2005.
Another problem would be one of source control. These web sites would be a
mixture of source controlled and unbound files. I think this too would get
very confusing.
>
"Patrice" wrote:
>

Quote:

Originally Posted by

>My personal preference would be likely still just to automate the copy
>using
>a tool such as "robocopy" (downloable from MS, allows to synchronize
>directories) either on demand or at logon time depending on the update
>frequency (are they updated so often ?) or as part of the build process.
>>
>The application could be also written to accomodate both scenarios (the
>location could be configurable, the application could redirect to an
>alternate location in dev mode).
>>
>You could also try a Windows admin group (you have little know options
>such
>as hardlinks or mount points though I believe it wouldn't work on a
>network
>share).
>>
>Good luck
>--
>Patrice
>>
>"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.coma crit dans le
>message
>de news: DCEC13E6-7A27-4852-A6A8-9CAC87F66E85@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into VS.NET
2005.
The problem that I am currently running into is that we have many web
applications that share common images and I don't know where to put
them.
I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an administrative
and
maintenance nightmare. We could store these images on a separate server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between development,
staging and our production environments. If we use <%=location%in the
tags
to find the location at runtime, then the images won't show up in the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.


>>
>>
>>


I understand the web.config portion, just don't know how to code the aspx
side so that the image will show up in the designer. At runtime (viewed in
browser) the proposed solution will work, but it doesn't seem to work at
design time.

"Kevin Spencer" wrote:

Quote:

Originally Posted by

Hi Jason,
>
Here's an example from an ASP.Net web application I have worked on:
>
<add key="ImagePath" value="http://www.airtraveler.com/airtraveler"/>
>
This is combined with the image file name in the app to create the URL of
the images in the app.
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
>
Sequence, Selection, Iteration.
>
>
"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:4255FE80-2457-4A80-A26B-C2E1F5797810@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Would you please give me a code snippit on this? If this works at design
time
I'm ready to roll.

"Kevin Spencer" wrote:

Quote:

Originally Posted by

Yes, as long as your web.config at design time is pointing to the actual
locations of the images.
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
>
Sequence, Selection, Iteration.
>
>
"Jason Camp" <JasonCamp@dotnet.itags.org.discussions.microsoft.comwrote in message
news:11CE38AC-6636-4CEE-90AF-F00E0279A918@dotnet.itags.org.microsoft.com...
Will this solution display the images at design time?

"Peter Bromberg [C# MVP]" wrote:

Put a "baseImageUrl" appSettings key in the web.config.
All your image urls would have this prepended. When you "move" the
app,
the setting can be changed in only one place.
Peter
>
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
>
>
>
>
"Jason Camp" wrote:
>
Since we are unable to use IIS on our developer workstations due to
security
policy, we would like to use the internal web server baked into
VS.NET
2005.
The problem that I am currently running into is that we have many
web
applications that share common images and I don't know where to put
them. I'm
not able to create a virtual directory in "Cassini", so that's not a
viable
solution. I also don't want to copy all the shared images under an
\images
directory under each web application as this will be an
administrative
and
maintenance nightmare. We could store these images on a separate
server
and
reference them via HTTP, but that won't be a nice solution from a
deployment
standpoint because we will need to change the code between
development,
staging and our production environments. If we use <%=location%in
the
tags
to find the location at runtime, then the images won't show up in
the
designer. I have searched the internet in vain for a solution, so
hopefully
you will have some guidance on this issue. I must be overlooking the
obvious.
>
>
>


>
>
>

Sharing HttpCache Across AppDomains?


I have a web page that instances a .cs class (lets call it ClassX) in
a code-behind. ClassX performs some work and saves a result into
HttpRuntime.Cache.
I plan to move ClassX out of the web app binary assembly completely,
compile it into a discrete DLL in a new assembly. Then the original
web page code-behind would use Remoting to talk to ClassX.
1. Will ClassX be able to save anything in HttpRuntime.Cache at all?
2. Will the original web page be able to get things out of
HttpRuntime.Cache that ClassX places in it in the first place?
Thanks.The Cache is strictly per appdomain. I don't think it would be easy to
maintain an application that communicted implicitly by passing values
around in a cache.
Scott
http://www.OdeToCode.com
On Thu, 09 Sep 2004 12:34:25 -0400, localhost <primpilus@.cohort.ces>
wrote:

>
>I have a web page that instances a .cs class (lets call it ClassX) in
>a code-behind. ClassX performs some work and saves a result into
>HttpRuntime.Cache.
>I plan to move ClassX out of the web app binary assembly completely,
>compile it into a discrete DLL in a new assembly. Then the original
>web page code-behind would use Remoting to talk to ClassX.
>1. Will ClassX be able to save anything in HttpRuntime.Cache at all?
>2. Will the original web page be able to get things out of
>HttpRuntime.Cache that ClassX places in it in the first place?
>
>Thanks.
Hi Localhost,
As for this problem,I agree with Scott. Since the ASP.NET appliation is
application based and each application is restricted by appDomain boundary,
I think we'd better store the data all in the web appliaiton's cache. And
if you're calling a certain class object in aother appdomain via remoting,
you need to return the processed data from the remote object's proxy object
everytime so that we can store it in the web application's Cache.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Sharing HttpCache Across AppDomains?


I have a web page that instances a .cs class (lets call it ClassX) in
a code-behind. ClassX performs some work and saves a result into
HttpRuntime.Cache.

I plan to move ClassX out of the web app binary assembly completely,
compile it into a discrete DLL in a new assembly. Then the original
web page code-behind would use Remoting to talk to ClassX.

1. Will ClassX be able to save anything in HttpRuntime.Cache at all?

2. Will the original web page be able to get things out of
HttpRuntime.Cache that ClassX places in it in the first place?

Thanks.The Cache is strictly per appdomain. I don't think it would be easy to
maintain an application that communicted implicitly by passing values
around in a cache.

--
Scott
http://www.OdeToCode.com

On Thu, 09 Sep 2004 12:34:25 -0400, localhost <primpilus@.cohort.ces>
wrote:

>
>I have a web page that instances a .cs class (lets call it ClassX) in
>a code-behind. ClassX performs some work and saves a result into
>HttpRuntime.Cache.
>I plan to move ClassX out of the web app binary assembly completely,
>compile it into a discrete DLL in a new assembly. Then the original
>web page code-behind would use Remoting to talk to ClassX.
>1. Will ClassX be able to save anything in HttpRuntime.Cache at all?
>2. Will the original web page be able to get things out of
>HttpRuntime.Cache that ClassX places in it in the first place?
>
>Thanks.
Hi Localhost,

As for this problem,I agree with Scott. Since the ASP.NET appliation is
application based and each application is restricted by appDomain boundary,
I think we'd better store the data all in the web appliaiton's cache. And
if you're calling a certain class object in aother appdomain via remoting,
you need to return the processed data from the remote object's proxy object
everytime so that we can store it in the web application's Cache.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Sharing login between different domain (again)

Sorry about my last post. There seems to be a bug in my newsreader-software.

My company (companyA) has bought companyB.
The website of companyA is www.companyA.com and comanyB's website is www.comanyb.com

Management want users logged in on www.companya.com to be automatically logged

in on www.companyb.com (and vice versa).
I was thinking of using the same stateserver from www.companya.com and www.companyb.com.
The problem with that solution is that the sessionid-cookie is not shared
from www.companya.com to www.companyb.com
IE: if the sessionid-cookie is not shared the user gets different session-ids

on the different web-servers and the
login is not shared.
Should I rewrite the HttpSessionState module to provide custom cookies?
Is there another solution to this problem?

/Nisse, Nisse@dotnet.itags.org.online.nospamI am thinking of <sessionState mode="SqlServer" ...
If you provide the same connection string to both application won't
this do the trick? This is just a suggestion, I haven't tried it, but
you can, if you have Sql Server running somewhere.

And why you need to share the same SessionState, is there any reason
for this beside the commong login mechanism? Because this can be
achieved programatically in different ways - just use a common user
database.
the browser will not share cookies between your sites unlues you change the
sites to have a common domain root (www.companya.newdomain.com and
www.comapnyb.newdomain.com). if the users get from one site to the other
through links on the sites, you pass a sessionid thru the link
(querystring), but this won't work with saved links or favs.

-- bruce (sqlwork.com)

"Nils Hedstrm" <Nisse@.online.nospam> wrote in message
news:13812632421871377119472@.msnews.microsoft.com. ..
| Sorry about my last post. There seems to be a bug in my
newsreader-software.
|
| My company (companyA) has bought companyB.
| The website of companyA is www.companyA.com and comanyB's website is
www.comanyb.com
|
|
| Management want users logged in on www.companya.com to be automatically
logged
|
| in on www.companyb.com (and vice versa).
| I was thinking of using the same stateserver from www.companya.com and
www.companyb.com.
| The problem with that solution is that the sessionid-cookie is not shared
| from www.companya.com to www.companyb.com
| IE: if the sessionid-cookie is not shared the user gets different
session-ids
|
| on the different web-servers and the
| login is not shared.
| Should I rewrite the HttpSessionState module to provide custom cookies?
| Is there another solution to this problem?
|
| /Nisse, Nisse@.online.nospam
|
|
Hi Nisse,

I think bruce's suggestion is reasonable. As for sharing logging between
multi sites, the asp.net 's formsauthentication did support cross
application authentication, but this is based on the multi applicaiton are
under the same public domain. This is because such authentication token is
normally stored in cookie which is identify by two things: domainname and
path , if the two sites have different internet domainname, the cross
application approach nolonger work. Currently I think there haven't any
good means except we use some global login system such as passport.

In addition, as for sharing sessionstate, I'm afraid this is also limited
since different application will have unique identity interanlly so that
the asp.net runtime will isolate their sessionstate even if we're using
SQLServer Session mode and sharing the same server for mantain session.
Maybe a custom session mechanism such as the custom SessionModule you
mentioned is required if you do need such behavior.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hello bruce,

> the browser will not share cookies between your sites unlues you
> change the sites to have a common domain root
> (www.companya.newdomain.com and www.comapnyb.newdomain.com).

Are you sure about this?
My tests indicate that the session-cookie has a host-value of the current
site. So the cookie is not shared (from companyb.companya.com to www.companya.com).
Unless I set a domain-value to the cookie ("companya.com") but it seems like
hard work to do this for session-cookies.

/Nisse <Nisse@.online.nospam
Hi Nisse,

Yes, cookie is identify by domainname and path value. By default the
domainname is the current page's server domain. In addition to this,
different browsers may have different cookie stored-path in the
clientside's temporary folder which may also break the single-sign-on. So
cookie-based solution is not quite solid for SSO.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)