views:

130

answers:

3

Hi all,

I have created an asp.net web application on my local machine and I am deploying it to sharepoint. For that I am refereing the following

Deploying ASP.NET Web Applications in the Windows SharePoint Services 3.0 _layouts Folder [http://msdn.microsoft.com/en-us/library/cc297200.aspx]

Its works perfect on my local machine but when I was trying to deploy the same on clients machine it was giving me the "An unexpected error has occurred." Error.

The scenario is, There is not visual studio install on my clients machine so what I was doing is I simply copying my solution folder in 12'hives LAYOUT folder along with the bin folder. Then when I was try to access it by hitting the URL

http://[machineName]/_layouts/[MyCustomFolder]/default.aspx it was giving me the error mention above.

Can anyone help me to solve this issue..? Thanks in advance..

Sachin

+1  A: 

Unexpected error might be anything, You need to see what is the root cause of the Error,

  1. Open the Web.Config file of the IIS SharePoint WebSite
  2. Search for the CallStack and change it to CallStack="true"
  3. Search for the CustomError and change it to CustomError="Off"
  4. Browse the page you will get to know the actual issue that causes the error
  5. You yourself can rectify it , it might be as simple as missing dll
Kusek
BESt sharepoint debug helper there is! P.S. Don;t do this in production environment :-D.
Colin
+1  A: 

Try to watch the logfiles, set logging level to maximum to be sure you see what sharepoint says about your page.

To do that, if you have access to the server:

  • open SharePoint Central Admin
  • go to Operations tab, select "Diagnostic logging"
  • select category 'All' and change the trace log level to 'Verbose', save changes
  • reset IIS server (for the purpose of a clean experiment)
  • open \\server\c$\Program Files\Common Files\Microsoft Shared\web server extensions\12 logs and order by modification date
  • try to load your webpage in /_layouts folder, see the error again
  • open the newest logfile you can see and search for [MyCustomFolder] name

Then post the error message here.

naivists
A: 

An unexpected error can have multiple reasons.

I publish the solution here http://guilhermeferreira.wordpress.com/2010/01/07/wss-3-0-an-unexpected-error-has-occurred/.

Go to C:\inetpub\wwwroot\wss\VirtualDirectories\80

Open Web.Config

Change

<SafeMode MaxControls=”200″ CallStack=”false”

to

<SafeMode MaxControls=”200″ CallStack=”true”

Turn off custom errors

<customErrors mode=”Off”/>
Guilherme Ferreira