ASP.Net Security Problem

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default ASP.Net Security Problem

    Hi

    I have a problem with permissions with an ASP.Net Application and IIS and SharePoint on Windows 2000 SP4 with .Net Framework 1.1.4322. The SharePoint 2001 SP 2a Portal Server is setup for Internet Access(Extranet Solution)

    I have a very simple piece of code that uploads a documents to a SPS 2001 SP2a server( see code below ). The code works fine on the server when the Virtual Directory I create is under the default web

    The application code is located on the c drive at c:\VBDocUpload and the code is snippet belo
    ------------------------------------------------------------------------------------------------------------------------------------------
    oDoc = New PKMCDO.KnowledgeDocumen
    oStream = oDoc.OpenStrea
    oStream.Type = ADODB.StreamTypeEnum.adTypeBinar
    oStream.SetEOS(
    oStream.LoadFromFile("c:\test.doc"
    oStream.Flush(
    oStream.Close(
    Response.Write(iStep.ToString + "<BR>"
    oDoc.ContentClass = "urn:content-classes:FAQ
    oDoc.Title = "Hello Everyone
    oDoc.Description = "This is a description
    oDoc.DataSource.SaveTo("http://www.ourcompany.com/Workspace/documents/test.doc, , , , , "username", "password"
    ------------------------------------------------------------------------------------------------------------------------------------------

    When the virtual directory is under default web [url]http://localhost/DocUploadVB/webform1.aspx[/url] this code uploads the documents to the SPS 2001 server and everything is fine. Virtual Directory points to c:\VBDocUpload, IIS permission are the same

    When we installed SPS 2001 we ran the extranet setup and it created a new web in IIS this web is called [url]www.ourcompany.com[/url]. When I create a virtual directory under this new website and point the virtual directory to c:\VBDocUpload the same code fails wit

    ================================================== ========================
    System.Exception
    System.Exception System.Runtime.InteropServices.COMException (0x8007010B): The directory name is invalid. at PKMCDO.IDataSource.SaveTo(String SourceURL, Object ActiveConnection, ConnectModeEnum Mode, RecordCreateOptionsEnum CreateOptions, RecordOpenOptionsEnum Options, String UserName, String Password) at DocUploadVB.WebForm1.btnUpload_Click(Object sender, EventArgs e
    Error Message: The directory name is invalid.
    ex.Source:CDO.KnowledgeDocument.
    ex.StackTrace: at PKMCDO.IDataSource.SaveTo(String SourceURL, Object ActiveConnection, ConnectModeEnum Mode, RecordCreateOptionsEnum CreateOptions, RecordOpenOptionsEnum Options, String UserName, String Password) at DocUploadVB.WebForm1.btnUpload_Click(Object sender, EventArgs e
    ex.TargetSite.Name:SaveT
    ================================================== ========================

    Any help would be appreicated as we have hit a wall on this issue. My assumption is that it has to with .Net Permissions(Code Groups, Permission Sets). THe .Net configuration has not been changed since installation.

    Thanks in advanc
    Sanjay Malhotr
    manjos<nospam>@yahoo.com
    Sanjay Malhotra @yahoo.com> Guest

  2. Similar Questions and Discussions

    1. Odd security problem
      We had a problem with our .NET applications on one of our application servers (it is not setup to be a domain controller). For some reason the...
    2. strange security problem
      I want to run asp.net under ID A and web service S under ID B (for logging reasons). However as soon as web service S accesses any COM object the...
    3. Security problem
      I noticed that Win XP change its security level after i use Norton Antivirus Software. I am not able to access the control panel and all the...
    4. Asp.net security problem...?
      Hi all , how can i prevent the user of the asp.net page to copy or print screen some text i put it on the page . Please if any one...
    5. Monumental Problem with XP Pro Security
      I have just rebuilt the Software partition of a machine conataining other partitions holding files managed by an earlier XP set up. I have been...
  3. #2

    Default Re: ASP.Net Security Problem

    Have you checked if the NTFS permissions on the folder are the same as the
    folder for the Default Web Site?

    HtH,

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Sanjay Malhotra @yahoo.com>" <manjos<nospam> wrote in message
    news:8914E829-2F94-4CC0-96C1-DF390F7FEB14@microsoft.com...
    > Hi,
    >
    > I have a problem with permissions with an ASP.Net Application and IIS and
    SharePoint on Windows 2000 SP4 with .Net Framework 1.1.4322. The SharePoint
    2001 SP 2a Portal Server is setup for Internet Access(Extranet Solution).
    >
    > I have a very simple piece of code that uploads a documents to a SPS 2001
    SP2a server( see code below ). The code works fine on the server when the
    Virtual Directory I create is under the default web.
    >
    > The application code is located on the c drive at c:\VBDocUpload and the
    code is snippet below
    > --------------------------------------------------------------------------
    -----------------------------------------------------------------
    > oDoc = New PKMCDO.KnowledgeDocument
    > oStream = oDoc.OpenStream
    > oStream.Type = ADODB.StreamTypeEnum.adTypeBinary
    > oStream.SetEOS()
    > oStream.LoadFromFile("c:\test.doc")
    > oStream.Flush()
    > oStream.Close()
    > Response.Write(iStep.ToString + "<BR>")
    > oDoc.ContentClass = "urn:content-classes:FAQ"
    > oDoc.Title = "Hello Everyone"
    > oDoc.Description = "This is a description"
    >
    oDoc.DataSource.SaveTo("http://www.ourcompany.com/Workspace/documents/test.d
    oc, , , , , "username", "password")
    > --------------------------------------------------------------------------
    -----------------------------------------------------------------
    >
    > When the virtual directory is under default web
    [url]http://localhost/DocUploadVB/webform1.aspx[/url] this code uploads the documents
    to the SPS 2001 server and everything is fine. Virtual Directory points to
    c:\VBDocUpload, IIS permission are the same.
    >
    > When we installed SPS 2001 we ran the extranet setup and it created a new
    web in IIS this web is called [url]www.ourcompany.com[/url]. When I create a virtual
    directory under this new website and point the virtual directory to
    c:\VBDocUpload the same code fails with
    >
    >
    ================================================== =========================
    > System.Exception
    > System.Exception System.Runtime.InteropServices.COMException (0x8007010B):
    The directory name is invalid. at PKMCDO.IDataSource.SaveTo(String
    SourceURL, Object ActiveConnection, ConnectModeEnum Mode,
    RecordCreateOptionsEnum CreateOptions, RecordOpenOptionsEnum Options, String
    UserName, String Password) at DocUploadVB.WebForm1.btnUpload_Click(Object
    sender, EventArgs e)
    > Error Message: The directory name is invalid.
    > ex.Source:CDO.KnowledgeDocument.1
    > ex.StackTrace: at PKMCDO.IDataSource.SaveTo(String SourceURL, Object
    ActiveConnection, ConnectModeEnum Mode, RecordCreateOptionsEnum
    CreateOptions, RecordOpenOptionsEnum Options, String UserName, String
    Password) at DocUploadVB.WebForm1.btnUpload_Click(Object sender, EventArgs
    e)
    > ex.TargetSite.Name:SaveTo
    >
    ================================================== =========================
    >
    > Any help would be appreicated as we have hit a wall on this issue. My
    assumption is that it has to with .Net Permissions(Code Groups, Permission
    Sets). THe .Net configuration has not been changed since installation.
    >
    > Thanks in advance
    > Sanjay Malhotra
    > manjos<nospam>@yahoo.com

    Andrea D'Onofrio [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139