问题描述
大家好,如果有人可以帮助我,我将在一个大型的基础架构中运行一个服务台网站.刚刚添加了上传文件功能.该网站在服务器PC上运行,并且我试图将网站用户的文件上传到其他服务器PC,但我一直在获得拒绝权限的错误,有人可以帮助我吗?昏暗的CallID,lConn,UserQuery,objcmd4,sqlText,intrecords
callID =会话("ACallID")
昏暗的照片上载DirVar
uploadsDirVar ="\\ spmrfnp1 \ Attachments \"& CallID&"
昏暗的myFSO
''将myFSO初始化为文件系统对象
SET myFSO = Server.CreateObject("Scripting.FileSystemObject")
''如果该文件夹尚不存在,则创建该文件夹
如果不是myFSO.FolderExists("\\ spmrfnp1 \ Attachments \"& CallID&")然后
myFSO.CreateFolder("\\ spmrfnp1 \ Attachments \"& CallID&")
设置lConn = Server.CreateObject("ADODB.CONNECTION")
lConn.Open"Provider = sqloledb;数据源= AIWPH2CWESSELS;用户ID = GCLS;密码= GCLSMGR;初始目录= GCLS"
设置objCmd4 = Server.CreateObject("ADODB.Command")
SQLText =插入[GCLS] .dbo.Attachments(CallID,FolderURL)值("& CallID&"'',"& UploadsDirVar&))"
objCmd4.ActiveConnection = lconn
objCmd4.CommandType =& H0001
objCmd4.CommandText = SQLText
objCmd4.Execute intRecords
设置objCmd4 = Nothing
lconn.close
如果
结束
而且我知道asp.net在将网站移至asp.net的过程中即时性要好1000万倍,但他们希望在本周末之前做好准备
而且我没有创建网站,只能对其进行编辑
并且服务器位于相同的网络和相同的域上
hi people if anyone can help me i am running a helpdesk website in a big infrastucture. just added a uploading files function. the website runs on a server pc and im trying to upload the files from the website users to a differnt server pc but i keep on getting a permission denied error can anyone help me please
dim CallID,lConn,UserQuery,objcmd4,sqlText,intrecords
callID = session("ACallID")
Dim uploadsDirVar
uploadsDirVar="\\spmrfnp1\Attachments\"& CallID &""
Dim myFSO
''Initialize myFSO as a file system object
SET myFSO = Server.CreateObject("Scripting.FileSystemObject")
''If the folder does not already exist then create the folder
If NOT myFSO.FolderExists("\\spmrfnp1\Attachments\"& CallID &"") Then
myFSO.CreateFolder("\\spmrfnp1\Attachments\"& CallID &"")
Set lConn = Server.CreateObject("ADODB.CONNECTION")
lConn.Open "Provider=sqloledb;Data Source=AIWPH2CWESSELS;User Id=GCLS;Password=GCLSMGR;Initial Catalog=GCLS"
Set objCmd4 = Server.CreateObject ("ADODB.Command")
SQLText = "insert into [GCLS].dbo.Attachments (CallID,FolderURL) values (''"&CallID&"'',''"&UploadsDirVar&"'')"
objCmd4.ActiveConnection = lconn
objCmd4.CommandType = &H0001
objCmd4.CommandText = SQLText
objCmd4.Execute intRecords
Set objCmd4 = Nothing
lconn.close
End If
and i know asp.net is 10000000 times better im in the process to take the website over to asp.net but they want this to be ready by end of the week
and i didnt create the website only got it to edit it
and the servers is on the same network and same domain
这篇关于ASP将文件从一台服务器PC上传到另一台PC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!