ASP.Net Security Problem

S

Sanjay Malhotra

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 http://localhost/DocUploadVB/webform1.aspx 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 www.ourcompany.com. 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
 
A

Andrea D'Onofrio [MSFT]

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> said:
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
http://localhost/DocUploadVB/webform1.aspx 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 www.ourcompany.com. 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,800
Messages
2,569,656
Members
45,395
Latest member
ErinStLeon
Top