Donnerstag, 6. Mai 2010

The request failed with HTTP status 405: Method not allowed - Webservice

Ich hatte vor ein paar Tagen einen Webservice in mein Projekt integriert. Dabei von einem Drittanbieter den Webservice als Webreference eingetragen, dazu die wsdl Adresse verwendet. Jedoch kam beim Testen einiger Methoden immer folgender Fehler: " The request failed with HTTP status 405: Method not allowed ". Im Internet habe ich nicht viel gefunden, ausser, dass man Einstellungen an der machine.config vornehmen sollte. Die Lösung war dann doch trivialer. Ich habe die wsdl Adresse im Browser aufgerufen. Dort im unteren Bereich die zuständige asmx Adresse gefunden. Die Url der Webservice Referenz überschrieben mit der asmx Url und schon hat es funktioniert. Resultat, wsdl ruft das Schema auf, asmx führt die Methode aus.
- überschreiben der Url heisst, die Klasse, welche ich aufgerufen habe über den Webservice, hatte eine Property mit Url, dort die asmx Adresse eingegeben und anschliessend den Request ausgeführt -
!Immer aufpassen ob es sich um http oder https handelt!

A few days ago, I integrated a third party web-service into my project. Therefore I created a web-reference and added the wsdl address of the web-service. When testing some calls to the methods of this service, I received the following error: " The request failed with HTTP status 405: Method not allowed ". On the internet I just found articles about changes in the machine.config. The solution was more trivial. I looked at the wsdl address in the browser and in the bottom part I found the asmx address for the web-service. I overwrote the property of the web-service reference and it worked. Result, wsdl calls the schema and asmx performs the methods.
- overwriting of the url means, that the class I called through the web-service, had a property called Url, and there I passed the asmx address und after that I performed the request -
!Always check if it is a http or https address!

Montag, 3. Mai 2010

Webservice certificate invalid

Ich hatte folgendes Problem. Beim Aufrufen eines Webservice, bekam ich folgenden Error:
The remote certificate is invalid according to the validation procedure
Dieser besagt, dass das Zertifikat, welches benutzt wird anscheinend nicht gültig ist. Damit man diesen Fehler ignorieren kann, vor dem Aufruf und der Arbeit mit dem Webservice folgenden Code einfügen:
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

// add this to your code before you make your web service call.
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslError)
{
bool validationResult = true;
return validationResult;
};


I had the following problem. When calling a webservice I received this error:
The remote certificate is invalid according to the validation procedure
This error means, that the certificate of the requested page is not valid. To ignore this error, you have to add the following code, before working and calling with the webservice:
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

// add this to your code before you make your web service call.
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslError)
{
bool validationResult = true;
return validationResult;
};

Donnerstag, 29. April 2010

Sharepoint 2010 File Share Search does not work

Das Einrichten einer Verzeichnis Suche ist teilweise mit ein paar Hindernissen verbunden. Folgendes sollte beachtet werden, damit es funktioniert:
1. Zuerst auf dem Server ein Verzeichnis erstellen.
2. Anschliessend dort als Share und Security den User mit Read Permission ausstatten, welcher auch im Sharepoint die nötigen Berechtigungen hat.
3. Anschliessend durch mappen des Verzeichnisses mit dem gewählten User testen, ob man direkt Zugriff hat. Wenn nicht, dann stimmen die Berechtigungen nicht.
4. Sollte alles funktionieren, dann diese Server-adresse, welche man zum Mappen benutzt hat in den Crawler in Sharepoint eingeben.

Setting um the file-share-search does have some obsticles sometimes. You should consider the following steps, to make it work:
1. Create a directory on the server.
2. Then set the user (is supposed to be your SP user) you want to have access to as a share and give him in the security tab the read-permissions.
3. Try to map the directory with the user credentials that your Sharepoint would use. If the mapping works, then sharepoint should be able to get to this directory as well. If it did not work, your permissions are not set correctly.
4. Enter the address you used for mapping into the crawler in Sharepoint.

Sharepoint 2010 Crawler

Wenn man beim Einrichten eines Crawlers den Eindruck hat, dass er nicht die komplette Webseite gecrawled hat, dann liegt das vielleicht daran, dass man die Crawl Rule für "Crawl complex URLs (URLs that contain a question mark - ?)" vergessen hat. Hierzu einfach neue Crawl Rule erstellen und als Pfad http://* eingeben. Somit werden auch URLs mit einem Fragezeichen gecrawled.

While setting up a crawler, if you have the impression, that not the complete website has been crawled, then the reason might be, that you have forgotten to set the crawl-rule for "Crawl complex URLs (URLs that contain a question mark - ?)". There for setup a new crawl rule and use the path http://*. Now also URLs with a question mark will be crawled.

Mittwoch, 28. April 2010

Probleme beim local-sites search in Sharepoint - Issues with local-sites search

Wenn es Probleme beim Crawlen der local-site gibt. Folgendes hat mir geholfen.

If you are experiencing problems with the local-site search. This one helped me.

http://svengillis.blogspot.com/2008/10/access-denied-when-crawling-moss.html

Meine Fehlermeldung im crawling-log war/my error in the crawling-log was:
Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled. (The item was deleted because it was either not found or the crawler was denied access to it.)

Can't deploy feature - Feature kann nicht deployed werden

Man muss beim deployen aufpassen. In SP 2010 muss man Siteowner sein, wenn man Features deployen will. Siteadmin reicht da nicht aus.

You have to take care when deploying. In SP 2010 you need to be site-owner, when you want to deploy features. Site-admin is not enough.

Mittwoch, 21. April 2010

Domänenwechsel Sharepoint - switch domain in Sharepoint

Wenn man einen Domänenwechsel einer Sharepointinstanz vornehmen will, dann muss man den Sharepoint neu installieren, da der Service-Account häufig nicht genug Rechte hat um die nötigen Services zu starten.
Backup DB, deinstallieren des Sharepoint, Neuinstallation DB wieder anhängen.

When you want to switch the domain of your sharepoint instance, then you will have to reinstall Sharepoint, because usually the service-account does not have the necessary rights to start certain services.
Backup the db, deinstall sharepoint, re-install and hook up with the db.

Montag, 19. April 2010

ERROR: The request failed with an empty response - Webservice

Ich habe einen fremden Webservice in mein .NET Projekt integriert. Anschliessend bei dem Response folgenden Fehler erhalten:
ERROR: The request failed with an empty response
Grund hierfür war, dass der Webservice eine falsche Url, besser gesagt keine SSL Verbindung hatte. Somit einfach die Url Eigenschaft meines Webservice Objektes überschrieben und auf die selbe Url gesetzt wie der Webservice und schon hat es funktioniert.
myWebServiceObject.Url = "https://...";

I used a foreign web-service in my .NET Projekt. When handling the response, I got this error-message:
ERROR: The request failed with an empty response
Reason for that was, that the web-service dealed with a wrong URL, in detail, it did not use a SSL connection. Therefore I just overwrote the property of my web-service object and it worked.
myWebServiceObject.Url = "https://...";

Dienstag, 13. April 2010

Cannot save URL for int.js

Nicht alle Sprachvarianten scheinen in der Sharepointinstallation installiert zu sein.

It seems, that there are not all language-packs installed in your current sharepoint-install.

Montag, 12. April 2010

cannot start service SPUserCodeV4

Wenn beim Deployment für Sharepoint 2010 folgender Fehler erscheint: cannot start service SPUserCodeV4, dann muss in den Windows Services der Sharepoint 2010 User Code Host gestartet sein, damit ein Deployment funktioniert.

If you get an error like this: cannot start service SPUserCodeV4, while deploying for Sharepoint 2010, then you need to start the Windows service called Sharepoint 2010 User Code Host. Afterwards the deployment should work.