Sachin
Sachin

Reputation: 479

An unexpected error has occurred

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

Upvotes: 2

Views: 24433

Answers (4)

Calin Vlasin
Calin Vlasin

Reputation: 1433

I know that is an old question but for me the fix was to stop and start again the SharePoint Web Application from IIS.

Upvotes: 1

Gui Ferreira
Gui Ferreira

Reputation: 4627

An unexpected error can have multiple reasons.

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”/>

Upvotes: 2

naivists
naivists

Reputation: 33511

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.

Upvotes: 4

Kusek
Kusek

Reputation: 5384

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

Upvotes: 5

Related Questions