Re: DocLibEvent SPFile.CopyTo error
- From: "Kolky" <a.vanderkolk@xxxxxxxxx>
- Date: 5 Oct 2006 00:29:02 -0700
I dont know wich of the two solutions worked. I changed the
impersonating script to the one adviced by Microsoft. And i upped my
memory on the virtual machine, and now it worked, thanks alot :)
Alexander van der Kolk
Eugene Rosenfeld wrote:
I've sometimes gotten COM exceptions in SharePoint if the server is running
low on memory. If you are running in a virtual machine, try allocating more
memory to it.
--
-Eugene Rosenfeld
"S.S. Ahmed" <ss_ahmed1@xxxxxxxxxxx> wrote in message
news:uIUbezv5GHA.4604@xxxxxxxxxxxxxxxxxxxxxxx
Try impersonating as an admin.
http://support.microsoft.com/?kbid=823278&FR=1
http://support.microsoft.com/?id=909455
--
S.S. Ahmed
www.walisystems.com
"Kolky" <a.vanderkolk@xxxxxxxxx> wrote in message
news:1159870371.997791.70740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear SharePoint Developers,
I have a Document Library where a event is linked to it wich does the
following:
public void OnEvent(SPListEvent evt)
{
if(evt.Type == SPListEventType.Insert)
{
SPWeb web = evt.Site.OpenWeb();
SPFile file = web.GetFile(evt.UrlAfter);
string url = evt.Title + "\\Example\\" + file.Name;
try
{
file.CopyTo(url,true);
}
catch {}
}
}
Everytime i upload a new document i get the exception below. I've
searched the net and on this usenet group found something about
changing the IPermission and changing the trust level to full. I did
both and still i keep getting this error. Anyone has any idea /
suggestion or hint that could help me.
I edited the IPermission to the files: wss_mediumtrust.config &
wss_minimaltrust.config
In the folder: C:\Program Files\Common Files\Microsoft Shared\web
server extensions\60\CONFIG
And i changed the trust level in the file: web.config
In the folder: C:\\inetpub\wwwroot\
Microsoft.SharePoint.SPException: Cannot complete this action.
Please try again. ---> System.Runtime.InteropServices.COMException
(0x80004005): Cannot complete this action.
Please try again.
at
Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String
bstrUrl, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32&
pnLocale, String& pbstrAlternateCSSUrl, String& pbstrCustomJSUrl,
String& pbstrAlternateHeaderUrl)
at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32&
A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32&
A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6)
at Microsoft.SharePoint.SPWeb.f()
at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl()
at Microsoft.SharePoint.SPWeb.get_Url()
at Microsoft.SharePoint.SPFile.a(String A_0, Boolean A_1, Boolean
A_2)
at Microsoft.SharePoint.SPFile.CopyTo(String strNewUrl, Boolean
bOverWrite)
at DocSpaceEvent.ServiceTest.OnEvent(SPListEvent evt)
Hope someone could help me!
Thanks,
Alexander van der Kolk
.
- References:
- DocLibEvent SPFile.CopyTo error
- From: Kolky
- Re: DocLibEvent SPFile.CopyTo error
- From: S.S. Ahmed
- Re: DocLibEvent SPFile.CopyTo error
- From: Eugene Rosenfeld
- DocLibEvent SPFile.CopyTo error
- Prev by Date: Error while accessing custom web part in remote machine
- Next by Date: WSS 2007 Mapping paths to sharepoint template directory ...
- Previous by thread: Re: DocLibEvent SPFile.CopyTo error
- Next by thread: SharePoint 2007 Custom Document router
- Index(es):
Relevant Pages
|