웹파트 한참 작업 하면서 계속 배포 하고, 수정 하고 반복을 하는데..

엑세스 할수 없다고 하면서 \\windows\assembly 에 리스트가 안보이고,  하얗게 될때가 있지요??


[뭐 직접 gac에 등록 할떄는  이렇게 되기도 하고요]



완전 짜증 납니다. 막 버닝 하다가 잠깐 다른거 해 볼까 하지만.. 5분 이면 그래도 10분씩 가면 완전 짜증나죠

어디에 dll이 물려 있어서 안되는 건데 그게 도대체 어디냐고!!! 하다가 -_-;;


알고 보니 이거 indexing service 만 멈춰 주면 해결 된다..


cmd - services.msc 하고

indexingservice 주저 말고 중지 해 주세요 -_-+ 이놈이 나의 버닝을 막았구나!!

여튼 해결 되네요 속시원 합니다!!


이올린에 북마크하기(0) 이올린에 추천하기(0)
Posted by happynuri

출처 : This solution contains two assemblies with the same name, or the SharePoint server already has


Question 1:

What resources are available for new SharePoint developers?


Answers:

SharePoint Developer Introduction for .NET Developers

http://www.microsoft.com/click/SharePointDeveloper/

 

SharePoint 2007 Videos and Webcasts
http://msdn.microsoft.com/en-us/office/aa940989.aspx

Microsoft SharePoint Team Blog

http://blogs.msdn.com/sharepoint/


Best Practices Resource Center for SharePoint 2007 (NEW)
http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx

Arpan Shaw's Blog
http://blogs.msdn.com/arpans/

Paul Andrew's Blog
http://blogs.msdn.com/pandrew/

SharePoint Practice and Guidance
http://msdn.microsoft.com/en-us/library/dd203468.aspx
http://www.codeplex.com/spg

 

Question 2:

When developing against the SharePoint object model on a machine that is not part of a SharePoint farm you receive the error “Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.SharePoint.CoreResource' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly” or another generic error message.

 

Answer:

The SharePoint object model can only be used when the application is run on a server in the SharePoint farm. It cannot be executed remotely. If it is not possible to run the application on a SharePoint farm server you should investigate using the SharePoint web services instead. The Windows SharePoint Services and Microsoft Office SharePoint Services web services are documented in the following SDK’s.

 

Microsoft Office SharePoint Server 2007 SDK: Software Development Kit

http://www.microsoft.com/downloads/details.aspx?FamilyId=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en

 

Windows SharePoint Services 3.0: Software Development Kit (SDK)

http://www.microsoft.com/downloads/details.aspx?FamilyID=05e0dd12-8394-402b-8936-a07fe8afaffd&DisplayLang=en

 

Question 3:

You receive “The "yourWebPartName" Web Part appears to be causing a problem” or "An unexpected error has occured"  or another generic error message when developing a web part.

 

Answer:

Exceptions are caught by SharePoint and a friendly error message is displayed instead of a stack trace.

To display the full exception needed for debugging make the following changes to your SharePoint site’s web.config file (Inetpub\wwwroot\wss\VirtualDirectories\yoursite\web.config).

 

 Find:   <SafeMode CallStack="false" />

 Replace with: <SafeMode CallStack="true" />

 Find:   <customErrors mode="On" />

 Replace with: <customErrors mode="Off" />

 Find:   <compilation debug="false" />

 Replace with: <compilation debug="true" />

 

Reproduce the problem and the true exception will be displayed.

 

Question 4:

You receive “Unknown Error” or another generic error message when developing aspx pages beneath _layouts.

 

Answer

Application pages beneath _layouts have a separate web.config file that needs updated to enable more detailed error messages.

 

Open \Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\web.config

Add the following XML block immediately after the <configuration element.

  <SharePoint>

    <SafeMode CallStack="true">

      <PageParserPaths>

      </PageParserPaths>

    </SafeMode>

  </SharePoint>

Find:   <compilation debug="false" />

Replace with: <compilation debug="true" />

 

Question 5:

You are developing a SharePoint component on an XP or Vista client and you need to debug to troubleshoot your component.

 

Answer

Enable Visual Studio 2005 or 2008 Remote Debugging to enable remotely setting breakpoints and single step debugging through your code.

 

See the following article for detailed configuration settings:

http://msdn.microsoft.com/en-us/library/bt727f1t(VS.80).aspx

 

Once the debugger is configured you will need to select Debug -> Attach to Process. You should see a list of processes appear. You will need to select w3wp.exe (there may be multiple instances and yes you can multi-select) and click “Attach”.

 

Once attached you can set a break point in the code that you need to debug and reproduce the problem on the server.

For web parts this could be refreshing the page

For a feature receiver this could be activating or deactivating the feature

For an event receiver this could be manipulating data in a list (such as adding, deleting, check-in/check-out) etc…


Note if you are debugging across different domains try the following guidance:

 

On your development workstation create a local account with the same name and password as your domain account then add it to the administrators group.

 

On the remote server create a matching domain account (same username and password) and add it the administrators group.

 

Configure the Visual Studio Remote Debugger Service on the remote server to login as the domain account.

 

Question 6:

You are trying to call a SharePoint web service but you are receiving SoapException or SoapServerException errors.

 

Answer:

Add a catch handler to your web service call and handle the exception. Inside of the Detail property will be more detailed information to assist troubleshooting.

catch (System.Web.Services.Protocols.SoapException se)

{

        // se.Detail has more information

}

 

 

Question 7:

Your SharePoint site is exhibiting heavy memory usage and is performing slowly or you are experiencing application pool recycles due to out of memory conditions.

 

Answer:

Please review Roger Lamb’s blog entry “SharePoint 2007 and WSS 3.0 Dispose Patterns by Example” to ensure you are properly utilizing the Dispose method when using the SharePoint object model.

http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx

 

Question 8:

When using the SharePoint class UserProfileManager to read user profiles you receive the error “Only an administrator may enumerate through all user profiles”.

 

Answer:

There is now a hot fix available for this. At the time of this writing the KB article is not published but you can call into Microsoft support and request the fix by number 952294.

Question 9:

When calling a web service from within a Web Part or an application outside of IIS you receive the following error:

 

Unhandled Exception: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

 

Answer:

The web service needs credentials to be set before making calls.

Examples:

·         listService.UseDefaultCredentials = true;  // use currently logged on user

·         listService.Credentials = new System.Net.NetworkCredential("user", "pass", "domain"); // use specified user

 

Question 10:

When developing against the SharePoint object model in an application outside of IIS (service, console, Winforms etc..) you receive the error “FileNotFoundException” when creating an instance of the SPSite object.

 

Answer:

The user running the application needs to have the following permissions and group membership set:

·         The user is a server farm administrator. 

·         The user has Read and Write permissions on the content database. 

·         The user is a site collection administrator. 

·         The user has permissions to access the Windows SharePoint Services site or the SharePoint Server 2007 site through which the code iterates. 

 

Question 11:

You receive the error “This solution contains two assemblies with the same name, or the SharePoint server already has an assembly with the specified name.” when deploying a solution using the Visual Studio Extensions for SharePoint (VSEWSS) after you have already deployed it to a different site on the same server.

 

Answer:

Remove the solution’s assembly from the Global Assembly Cache (GAC).

·         Gacutil –uf assemblyName   (note: no .dll extension is specified)

·         Rename or Remove the feature from “Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\FeatureName”  (note: FeatureName may not be the same as assembly name – look in your manifest.xml to find the correct name)

 

Question 12:

When trying to deploy a VSEWSS solution using the Visual Studio “Deploy” command you receive the error “Value does not fall within the expected range.”

 

Answer:

Remove all projects except the VSEWSS project from the Visual Studio solution then attempt your deployment again.

 

Question 13:

You receive the error “Attempted to read or write protected memory.” when trying to cancel a checkout using the ItemCheckingOut Event Receiver.

 

Answer:

This is a known issue. To workaround you should set the Status property to SPEventReceiverStatus.CancelNoError instead of SPEventReceiverStatus.CancelWithError or setting properties.Cancel = true;

See http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.itemcheckingout.aspx for more details.

 
Question 14:

My webpart is essentially "frozen" or dead after I write a file to the client using Response.WriteFile or .End or .Flush etc..

Answer:

http://msmvps.com/blogs/laflour/archive/2008/06/06/page-events-stop-working-after-using-output-stream-for-binary-download.aspx

Question 15:

You receive a 401 Access Denied when calling web services and you know permissions are configured correctly. 

Answer:

http://support.microsoft.com/default.aspx/kb/896861

이올린에 북마크하기(0) 이올린에 추천하기(0)
Posted by happynuri
TAG error, QnA


MOSS 개발을 하려면, Visual Studio 2005이상을 깔고, moss랑 sql 도 설치 해서 정상적으로 사용할수도 있지만,

나는 내 로컬에서 빌드만 해서, 서버에 배포는 수동으로 할꺼야!! 할수도 있지요??

이럴때 Tip이예요~ 영어가 짧아서 링크에 원문이 있는데 이해가 안되서,

그림과 곁들여서 다시 적었습니다 ㅎㅎ

1. 일단은 visual studio를 설치 합니다.

2. 알맞은 버전에 따라서, sharepoint templete를 추가 하기 위한 파일을 다운로드 받습니다. 

Visual Studio 2005의 경우
http://www.microsoft.com/downloads/details.aspx?familyid=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&displaylang=en

Visual Studio 2008의 경우
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7bf65b28-06e2-4e87-9bad-086e32185e68/

이 링크로 가서 설치 해 주시면 됩니다.

3. 그런데... 막상 설치 하는데, moss가 안깔려 있으면,  요런에러가 나지요 :)


이럴때 쓰는 방법!!! ㅎㅎ


SharePoint가 설치 된 것 처럼 가장 해 주면 됩니다.

1) 시작 – CMD – REGEDIT
2) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0 경로로 이동하세요
3) 문자열값을 만들어 주세요 



 
4) 문자열값의 이름은 SharePoint 데이터는 Installed로 설정 해주세요




이러고 설치하면 됩니다. xp와 vista에서 된다고 하네요~^^


그리고 빌드 하시면, Microsoft.Sharepoint.dll이 없어서 빌드가 안되는데요~

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\ISAPI 이경로에서 가진

Microsoft.Sharepoint.dll을 reference ADD 하셔서 사용하시면 되겠습니다~^^

없으실까봐, dll 첨부 하였습니다. 수고하세요~

이올린에 북마크하기(0) 이올린에 추천하기(0)
Posted by happynuri