Showing posts with label Exception Handling. Show all posts
Showing posts with label Exception Handling. Show all posts

Microsoft.Office.Server.UserProfiles.UserProfileException: The request channel timed out

This is the continuation of Part 1. I have written a post on solving the issues while installing SharePoint 2010 in my previous post. So, As I said in my previous article, the new exception message I got in my system is below.

Microsoft.Office.Server.UserProfiles.UserProfileException: The request channel timed out while waiting for a reply after 00:00:19.9340000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:19.9340000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'https://myserver:32844/d31735f8a1b34f3a8263707181c7e298/ProfilePropertyService.svc' has exceeded the allotted timeout of 00:00:19.9990000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out

So, what the above error message means? I also don't know anything about it at first glance. But, how did I resolv it?

I read the exception message 4 times continuously and understood again that this is the problem because of the WCF service. I copied the above given url in IE, waited for the response. But bad luck, didn't get any response.

Resolution:
As it is a service[.svc], What the idea I got here is, this path should exists some where on the file system. So, What I did? I search the file system for the file ProfilePropertyService.svc. And luckily I found the file in a location at "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\d31735f8a1b34f3a8263707181c7e298\5902e8c4\679035c5" with the file name "profilepropertyservice.svc.cdcab7d2.compiled'. So, this is what helped me and felt very happy by seeing it. You know what? First time when I ran the configuration wizard the service compiled and I was stuck because of first exception I got[Resolved in previous article.] After that I reran the configuration wizard then it again compiled but didn't updated the temporary ASP.NET files folder. So, I just did IISRESET on the server and started the configuration wizard again and everything completed successfully.

Now, I have everything setup and running. I felt very happy and started playing with SharePoint 2010. Hope this helps you to solve the problems and I think you like the way I approached to resolve these issues. Let me know your ideas and feel free to ask me if you are facing any problems. Read More...

Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute allowInsecureTransport

Today, I got SharePoint 2010 Public BETA downloaded and installed on my laptop. It is very smooth and run very fast and total size is very less. All the prerequisites ran complete and while running the Product Configuration Wizard I got an exception and below is the detailed message of it.


Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56) ---> System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)

There is a hotfix released on kb. Check this. http://support.microsoft.com/kb/976462

So, this is the best part of the wizard. It completely given me very clear and wonderful message so that I can understood by reading it once. So, I went to the path above given in message and looked for the client.config file.

In the section, I found the line allowInsecureTransport="true". I don't know what to do with that. Because, As it said, it is case sensitive in error message, I tried with different combinations like camel case, pascal case, all lower, all upper etc..... But nothing worked.
After thought about it for a while, I just removed the attribute from the config file and saved the config.

Now, I reran the configuration wizard, there I see that this problem won't exist any more.

So, how this worked? When I deeply look into the config file, I understood that it is the WCF service setting. So, as you all know SharePoint 14 is supporting WCF services they have implemented some services based on it. In this BETA version, somehow that attribute is missing and it's not finding by the system.

So, now I resolved the issue and didn't get this problem again. But, this time I got a new and unexcepted exception message on my screen. See this post for more details.

But above both messsages came while running 8 of 10 step in configuration wizard while creating sample data.

Keep an eye on my blog for more solutions and updates from the technologies you like. Love to hear comments.
Read More...

Unable to update the EntitySet Table because it has a DefiningQuery and no InsertFunction element exists in the ModificationFunctionMapping element to support the current operation

ASP.NET MVC is the technology released from Microsoft long time back. But I didn’t get time to dig into it and research on it. Now, I need to learn it as my next project is in ASP.NET MVC. So, I thought to give a try and want to show all records in a table and insert a new record in a table. On the way, The above is the exception which blocked me to go proceed. I didn’t do any mistake and always the above exception come into picture when I try to create a new record in table.
So, frustrated and started research on the error and debugging. After a long research found the issue in the Entity framework. The whole thing is only because I forgot to add primary key to the table in the database. Once I added the primary key and reconstructed the edmx file with new changes, All works fine and record added to table in database. So, what is happening inside is, entity framework is looking for a key in each and every table [Primary key]. So, don’t forget to add a primary key to each and every table which you want to use in entity framework file [.edmx]. Otherwise you always see this exception when you try to insert or update a record.
"Unable to update the EntitySet 'Table' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation."
Is this helpful? Follow me if you want to learn ASP.NET MVC framework. I started learning and will place all my experiences and problems I face in my blog. So, keep an eye on my blog for more updates. Read More...

How to see actual exceptions or errors in SharePoint instead of Unknown errors message

When I was new to SharePoint programming, I faced plenty of problems to find out what errors or exceptions coming on a SharePoint web page. Because as of my knowledge those days, I thought like there is only one place where we can find the details of the exception or error coming and that is nothing but logs. [Which usually located in 12 hive.] But after got some experience with SharePoint slowly learning new things and found a way to see the exception directly on the screen[browser] instead of going to logs and check there.

When an exception comes in SharePoint environment usually the page we see is Unknown error, nothing else. 

To see the actual exception details follow the steps below.

  • Go to the location where your SharePoint application is present in the file system. It is usually at the location inetpub/wss/virtual directories/[port number].
  • Find the web.config file.
  • Take a backup of it.
  • Open the file in some nice editor like Visual studio and find the tag <SafeMode
  • This is the first child tag under <SharePoint>
  • You can see the tag syntax something similar to this.

     <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" …….

  • One of the attributes for <SafeMode called CallStack, which holds the boolean value which tells to SharePoint framework whether to show the actual exception details or not.
  • Set this value to true in-order to view the actual exception details on screen[browser].
  • Set the CustomErrors section to Off to view complete details as shown below.
  • <customErrors mode="Off" />
  • IISRESET is not compulsory. If you do then that will be good.

Hope this will help to you to make fast development and no such big pains to look into all the log files for errors.

Note: Please use this option only on the development environment to make development fast. On production servers and QA environment, don't make the above changes to the file. If you do this, all your end users will see the actual exception or error details, which is not good.

Read More...
Related Posts with Thumbnails
GiF Pictures, Images and Photos