Microsoft Content Management Server - Urgent Help: Resource Gallery Upload Server error

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2005 > Urgent Help: Resource Gallery Upload Server error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Urgent Help: Resource Gallery Upload Server error
MSH

2005-11-15, 5:56 pm

Hello everybody,

I am using the PAPI to upload an image to a resource gallery in MCMS 2002. I
have successfully authenticated the user and changed the mode to update. When
I try to perform the upload I get the following error : "Server error.
Contact System Administrator". The error is of type
"System.Runtime.InteropServices".

Below is the code I am using:

Dim context As CmsApplicationContext = New CmsApplicationContext
context.AuthenticateAsUser("someusername", "somepassword",
PublishingMode.Update)
Dim gallery As ResourceGallery =
CType(context.Searches.GetByGuid("someguid"), ResourceGallery)
If gallery.CanCreateResources Then
gallery.CreateResource("C:\SomeFile.gif") //Crashes here: Server error.
End If
context.CommitAll()

I would appreciate any help as this is very urgent.

Thanks in advance

Regards
Stefan [MSFT]

2005-11-15, 5:56 pm

Hi,

this usually happens if the server is not able to successfully upload the
item.
Common reasons:

- the file has 0 bytes in size
- the file permissions do not allow MCMS to upload the item
- other IO problems.

Please use filemon from www.sysinternals.com to monitor the file access if
you are not able to isolate the reason.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"MSH" <MSH@discussions.microsoft.com> wrote in message
news:1F38A0F0-7EDA-4AAB-96C9-289878A1D96E@microsoft.com...
> Hello everybody,
>
> I am using the PAPI to upload an image to a resource gallery in MCMS 2002.
> I
> have successfully authenticated the user and changed the mode to update.
> When
> I try to perform the upload I get the following error : "Server error.
> Contact System Administrator". The error is of type
> "System.Runtime.InteropServices".
>
> Below is the code I am using:
>
> Dim context As CmsApplicationContext = New CmsApplicationContext
> context.AuthenticateAsUser("someusername", "somepassword",
> PublishingMode.Update)
> Dim gallery As ResourceGallery =
> CType(context.Searches.GetByGuid("someguid"), ResourceGallery)
> If gallery.CanCreateResources Then
> gallery.CreateResource("C:\SomeFile.gif") //Crashes here: Server
> error.
> End If
> context.CommitAll()
>
> I would appreciate any help as this is very urgent.
>
> Thanks in advance
>
> Regards



MSH

2005-11-16, 2:48 am

Thanks Stefan for your immediate help.
What you suggested solved the problem.

For other users who might face the problem, the Filemon utility revealed
that the mcms system account did not have permissions to access the image
file i was trying to upload.

Regards,

"Stefan [MSFT]" wrote:

> Hi,
>
> this usually happens if the server is not able to successfully upload the
> item.
> Common reasons:
>
> - the file has 0 bytes in size
> - the file permissions do not allow MCMS to upload the item
> - other IO problems.
>
> Please use filemon from www.sysinternals.com to monitor the file access if
> you are not able to isolate the reason.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> Check out the new book as well: Advanced MCMS development:
> http://tinyurl.com/8ugwj
> ----------------------
>
>
> "MSH" <MSH@discussions.microsoft.com> wrote in message
> news:1F38A0F0-7EDA-4AAB-96C9-289878A1D96E@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com