locked
Membership and Roles configuration issue - machine.config file? RRS feed

  • Question

  • User-1166428634 posted

    Hi All,

            Whenever I want to use Membership and Roles in my project then first I open machine.config file then add ConnectionString , Membership and Roles ( copying the previous code ) and then I select Provider from aspnet configuration and then i create Users and Roles.

    But whenever I want to execute this code on some other machine I have to keep this machine.config file with me and paste it on that machine. I am doing wrong i know it. But I do not understand how to resolve this issue?

    Thanks

    Wednesday, February 20, 2013 7:20 AM

Answers

  • User-166373564 posted

    Hi Shailendra

    Silverlight.Shailendra

    whenever I want to execute this code on some other machine I have to keep this machine.config file with me and paste it on that machine.

    You don't need to paste the machine.config file on other machine, I think you need re-do your membership and roles on other machine.

    Moreover, I don't think you need to paste your project to other machine,

    1) If you publish your project to Intranet, you could use it in Intranet;

    2) If you publish your project to external network, all can use it.

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2013 1:29 AM
  • User71929859 posted

    Hello,

    can you please tell me If i publish then don't require machine.config file to replace on c:\windows\framework.....\v2.0\config....?

    Whenever I want to use Membership and Roles in my project then first I open machine.config file then add ConnectionString , Membership and Roles

    Don't do it on the machine.config file. Do it in your web.config file. We use machine.config file to change the properties for all the asp.net applications in a particular machine. web.config file is where you should add your application specific settings. Since you are shipping the web.config file when you need to execute the code on other machine, you don't have to worry about code copy pasting. web.config settings will override the settings in the machine.config file.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2013 7:12 AM

All replies

  • User-166373564 posted

    Hi Shailendra

    Silverlight.Shailendra

    whenever I want to execute this code on some other machine I have to keep this machine.config file with me and paste it on that machine.

    You don't need to paste the machine.config file on other machine, I think you need re-do your membership and roles on other machine.

    Moreover, I don't think you need to paste your project to other machine,

    1) If you publish your project to Intranet, you could use it in Intranet;

    2) If you publish your project to external network, all can use it.

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2013 1:29 AM
  • User-1166428634 posted

    actually, i code it in my home and want to show to my faculties at college.  In our LAB i got this kind of problem...

    can you please tell me If i publish then don't require machine.config file to replace on c:\windows\framework.....\v2.0\config....?

    thanks

    Tuesday, February 26, 2013 1:49 AM
  • User-166373564 posted

    Hi Shailendra

    I don't think you need to change machine.config file on other machine when you publish it.

    If there is something wrong, please let me know. Thanks

    With regards

    Tuesday, February 26, 2013 2:53 AM
  • User71929859 posted

    Hello,

    can you please tell me If i publish then don't require machine.config file to replace on c:\windows\framework.....\v2.0\config....?

    Whenever I want to use Membership and Roles in my project then first I open machine.config file then add ConnectionString , Membership and Roles

    Don't do it on the machine.config file. Do it in your web.config file. We use machine.config file to change the properties for all the asp.net applications in a particular machine. web.config file is where you should add your application specific settings. Since you are shipping the web.config file when you need to execute the code on other machine, you don't have to worry about code copy pasting. web.config settings will override the settings in the machine.config file.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 26, 2013 7:12 AM