Couple ASP.NET 2.0 Questions - Roles + ApplicationID

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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
 
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 : )
 
Back
Top