Search

You searched for the word(s): userid:873124

Matching Posts

  • Securing specific files and folders

    I have a folder where I store some PDFs only available for members. I want to use asp.net memberships and roles to prevent non-members from being able to download these files. The location of the member files is as follows: /root/uploads/file/members/ I am trying the following, but it fails to work. <location path="Uploads/file/members"> <system.web> <authorization> <!--<allow roles="Members" />--> <deny users="*" /> </authorization>
    Posted to Security (Forum) by mcleanap on 11/7/2009
  • Re: Securing specific files and folders

    Yes, that is where the web.config file is. I wanted to use deny users="*" to start with in order to see if it was working under all circumstances. It's still not...I can bring up the file every time. Can specific non aspx documents work in this manner?
    Posted to Security (Forum) by mcleanap on 11/7/2009
  • Re: Securing specific files and folders

    I tried this originally, and it did not work either. Here is what I have in the members folder: <configuration> <system.web> <authorization> <!--<allow roles="Members" />--> <deny users="*" /> </authorization> </system.web> </configuration>
    Posted to Security (Forum) by mcleanap on 11/7/2009
  • Re: Securing specific files and folders

    No luck. In case I am doing something wrong, here is the URL I am trying to view...which I can, but would not like to. http://localhost/domainname.ca/uploads/file/members/English/Member%20Notes/2009/filename.pdf
    Posted to Security (Forum) by mcleanap on 11/7/2009
  • Re: Securing specific files and folders

    It still allows me to view the PDF documents in any folders within the members folder.
    Posted to Security (Forum) by mcleanap on 11/7/2009
  • Generic Lists and Find Match

    I am creating a list, something like: System.Collections.Generic.List<string> tempList= new System.Collections.Generic.List<string>(); tempList.Add("A person"); tempList.Add("A dog"); tempList.Add("A cat"); So I have a string variable that maybe looks like "A person is not like a cat". What I want to do is if any part of the string is a match in any of the list items, then let me know. True or false. Any ideas? I have tried: bool found = tempList
    Posted to Getting Started (Forum) by mcleanap on 10/29/2009
  • Re: Generic Lists and Find Match

    Well I ended up doing: bool errorFound = false; foreach (string item in tempList) { if (stringToMatch.IndexOf(item) >= 0) { errorFound = true; break; } } It works. Not sure if it's the best way though.
    Posted to Getting Started (Forum) by mcleanap on 10/29/2009
  • DropDownList User Control

    I am having trouble getting a DropDownList working as a custom control. I have a dropdownlist that I would like to reuse on several pages...same data. So I create the user control and place the DropDownList on it, populate it with data. Here is some basic code for the .ascx protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // populate the control with data strCulture.DataBind(); // Default the selected value SelectedValue = strCulture.SelectedValue; } } public string SelectedValue
    Posted to Web Forms (Forum) by mcleanap on 10/27/2009
  • Re: DropDownList User Control

    Here is the exact code. protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Database db = DatabaseFactory.CreateDatabase(); string sqlCulture = "Select intCultureID, strCulture, strDisplayCulture FROM culture"; DbCommand cmd = db.GetSqlStringCommand(sqlCulture); DataSet dsCulture = db.ExecuteDataSet(cmd); strCulture.DataSource = dsCulture; strCulture.DataTextField = "strDisplayName"; strCulture.DataValueField = "strCulture"; strCulture.DataBind
    Posted to Web Forms (Forum) by mcleanap on 10/27/2009
  • Re: AppSettings or Custom Class

    If you had to add another NEW key value pair, you would still have to update the class and recompile anyway, wouldn't you?
    Posted to Configuration and Deployment (Forum) by mcleanap on 7/17/2009
Page 1 of 5 (41 items) 1 2 3 4 5 Next >