Between a rock and a hard place!

  • Thread starter Max Stayner \(Avignon Solutions\)
  • Start date
M

Max Stayner \(Avignon Solutions\)

I'm attempting to build a complete site using ASP.NET, and so far its great,
EXCEPT...

The site needs to have both public and secured areas. No problem, you might
say - just create two virtual directories/applications, set authorization
for one and not the other. Fine, that works. However, I have a second
requirement, which is that I need a common look and feel between the two
areas (e.g. headers and footers). The logical approach is to use a Web
Control. The problem here is that a control defined in one application
cannot be used in another.

So what's the solution here? I've tried this from every angle I can think
of, and can't solve it. I refuse to believe that I'm the only person to
have this type of requirement!

Any ideas appreciated

Max.
 
M

Michael Pearson

Copy the control into both locations. I think others that have had similar
problems solved them in this way.

I think the way that I've handled this in the past is have a subdir under my
"public" site that contains the "secure" content. I don't remember how I
handled security, but I think it was forms authentication.

Michael


"Max Stayner (Avignon Solutions)"
 
K

Kevin Spencer

One option would be to use CSS to format both sites. You could then use the
same CSS file for both sites. You would be surprised what you can do with
CSS alone.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Max Stayner (Avignon Solutions)"
 
L

lyndon hughey

I would have all the page with the site inherit from one base page.
The page would have a property named BoolAuthenicationRequired.
If the
if (BoolAuthicationRequired= true)?login: no login required

"Max Stayner (Avignon Solutions)"
 
M

Max Stayner \(Avignon Solutions\)

Thanks Steve - that fixed it wonderfully. The article that solved it was
the last of the three you mentioned, which was kind enough to actually
provide the syntax needed in the web.config file.

Max.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top