Couple ASP.NET 2.0 Questions - Roles + ApplicationID

G

Guest

Hi all,

Just started using ASP.NET 2.0 and found it to be a big change from 1.1.

Couple of questions (probably more to come)!

1. Is there a way to hard code roles into the web.config? I like to be able
to deploy me app without manual configuration.


2. Is there a way to hardcode the application ID into my web.config? I like
to be able to move my application around different directories without
having my user data all screwed up because of a changing application ID.

Thanks!
 
P

PeterKellner

Hi all,

Just started using ASP.NET 2.0 and found it to be a big change from 1.1.

Couple of questions (probably more to come)!

1. Is there a way to hard code roles into the web.config? I like to be able
to deploy me app without manual configuration.


2. Is there a way to hardcode the application ID into my web.config? I like
to be able to move my application around different directories without
having my user data all screwed up because of a changing application ID.

Thanks!

In your global.asax file you can check if your roles exist and if not,
add them there. (see the starter apps for examples)

You can put the applicationId in the Membership section of your
web.config

Good luck.
Peter Kellner
http://peterkellner.net
 
G

Guest

In your global.asax file you can check if your roles exist and if not,
add them there. (see the starter apps for examples)

Ah thanks - I thought I'll have to do it in code. I was hoping I could just
add them to the web.config (too bad since ASP.NET 2.0 seems to have beefed
up the web.config quite a bit).
You can put the applicationId in the Membership section of your
web.config

Thanks for the suggestion : )
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top