I would like to create few pages, that can be accessed only by the registered users ? and i don't want those pages to be public to everything, only registered users who have login username/password
Create a sub folder like yourstie.com/members - You will then need to add a web.config to the sub folder and add which members or roles have access to this folder. Have a look at this article. http://www.theserverside.net/tt/articles/showarticle.tss?id=FormAuthentication
Create a sub folder like yourstie.com/members - You will then need to add a web.config to the sub folder and add which members or roles have access to this folder. Have a look at this article. http://www.theserverside.net/tt/articles/showarticle.tss?id=FormAuthentication
hope this helps, Matthew
Thanks for replying back mathew, yea i already know about the method, i was just trying to find if there is something in-built in nopCommerce 1.4 as my website is live so don't wanna touch webconfig.
Even if the website is live can i do it and i just have to re-build the website ? what dll files i have to replace then ? and what else ?
I WANT TO MAKE A PAGE PRIVATE, do you know any other alternative way or trick instead of doing any modification in the code ?
An existing page or a new page? The chnages I descibe above will not effect anything existing of the site. Your are not editing the web.config in the root directory but creating a new one in the sub folder. I don't beleive there is anything exisitng feature in nop to make a page private.
An existing page or a new page? The chnages I descibe above will not effect anything existing of the site. Your are not editing the web.config in the root directory but creating a new one in the sub folder. I don't beleive there is anything exisitng feature in nop to make a page private.
So mathew, if i add folder as member, add an aspx page in it and add w) i don't have to rebuild the project ? and it won't mess up the whole project ? Just want to make sure as don't want to take any chance
If you don't want to take any chance then don't do it (you need to confident in your own abilities). Test locally and if it works locally then deploy. If your .aspx has no code behind that doesn't need to be compiled then it should work fine.
ok mathew, i was trying locally, created folder as "Members" and within this folder created an aspx page and webconfig file
Here is the code of my tech.aspx page (i deleted .cs file because when we add new item it automatically creates .cs so i deleted so that i don't have to re-build the project)
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.google.com">THIS IS PRIVATE AREA ONLY FOR TECHNICIANS</asp:HyperLink> </div> </asp:Content>
Here is the my webconfig <?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings/> <system.web> <authorization> <allow roles="Admin"/> <allow roles="Tech"/> <deny users="?"/> </authorization> </system.web> </configuration> ------------------------------- from my admin section i went to : admin section > manage customers > magane roles created a role as "Tech"
then i created an account/username and i linked that specific username with that role "tech" by checking that checkbox of Tech role within the username details
so now only this username is defined as tech role right ? or only this username/user account should be able to access the page but in my situation if i login with other member username who is not defined as Tech role still i can access the tech.aspx page
in my webconfig, i tried this too : <deny users="*"/> in this situation only admin can access the page not even the username that i linked with tech role can access, by using "*" sign only admin gets access.