Wednesday, September 14, 2011

Biztalk error:Cannot locate document specification because multiple schemas matched the message type

I have two biztalk application querying data from oracle database one of them connecting to testing db and other staging db.both db have the objects with same schema, tables,views,packages,procedures,functions.....

so when i start the orchestartion and test the application i get error

There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=4FbH8369ad789B92" Source: "XML disassembler" Send Port: "SENDPORTNAME" URI: "oracledb://connectionstring/" Reason: Cannot locate document specification because multiple schemas matched the message type "http://Microsoft.LobServices.OracleDB/2007/03/SCHEMA/View/VIEW_NAME#SelectResponse".

i could easily understand the error is due to the same object name in both databases because other application is already using the message type.

what i could do is

go to BizTalk Administration - Applications - Application Name - Send Ports - open SENDPORTNAME - click on Receive Pipeline properties

and set AllowUnrecognisedMessage to True

click ok  and apply . check the orchestration again by dropping a message or calling the webservice . it works !!

IIS 7.0 IP Address Security

i was totally lost with the new approach of security in Windows Server 2008. in older version of OS there used to be ip address restriction if you go to iis website properties, well i couldn't figure it out untill today in windows 2008.

From Server Manager - Roles - Web Server (IIS) - Internet Information Service (IIS) Manager
click on your computer name - sites- Default Website - your site

on the right side you can see under IIS IP Address and Domain Restrictions - double click and open


click on Add Allow Entry and add the ip address to allow and also allow 127.0.0.1 if you are specifying <ipSecurity allowUnlisted="false" /> in applicationHost.config file

allowUnlisted - Specifies whether to allow unlisted IP addresses. Setting the allowUnlisted attribute to true allows an unlisted IP address to access the server. Setting the allowUnlisted attribute to false locks down the server, preventing access to all IP address unless they are listed. If you were to set this attribute to false and do not list the local loopback address (127.0.0.1) as an allowed IP address, you would not be able to access your server by using a browser from a local console.
This attribute can also affect delegation. If you were to set this attribute to false in a parent configuration, you would not be able use the <clear> element to clear this configuration in child configuration files.
The default value is true.


to set <ipSecurity allowUnlisted="false" /> . open notepad, then file open , \\windows\system32\inetsrv\config\applicationhost.config search for ipSecurity andchange the entry. save the file and now test it.

References:

http://www.iis.net/ConfigReference/system.webServer/security/ipSecurity
http://forums.iis.net/t/1041077.aspx

Wednesday, September 7, 2011

peoplepicker property in sharepoint

here i am adding few info about peoplepicker property which is useful to work with users from other domains. i have used it before and it worked successfully. but didn't try to add in blog .
--------------
stsadm -o setproperty -pn peoplepicker-searchadcustomquery
stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "(canonicalName=[YOURDOMAIN]*)" -url http://[yoursharepointsitecollection]
e.g stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "(canonicalName=DEV*)" -url http://vmsd-sharepoint
If you want to switch this off then run the same command but change the -pv parameter to ""
e.g stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "" -url http://vmsd-sharepoint
---------------
Here's a list of the people picker properties that can be set ()
peoplepicker-activedirectorysearchtimeout
peoplepicker-distributionlistsearchdomains
peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
peoplepicker-onlysearchwithinsitecollection
peoplepicker-searchadcustomquery
peoplepicker-searchadforests
---------
peoplepicker-searchadforests
If it is not a two way trust then you will need to specify an account and password, which are encrypted and stored in the config database.  The "peoplepicker-searchadforests" stsadm property allows you to search multiple values when picking users.  With the command you can add multiple forests, domains, and accounts and even specific property searching.
stsadm.exe -o setproperty -url http://server:port -pn "peoplepicker-searchadforests" -pv "forest:foo.corp.com;domain:bar.foo.corp.com", LoginName, Password
To use peoplepicker-searchadforests with credentials, which you need to specify if you don’t have two-way trusts in place, you must first set an encryption key:
stsadm.exe -o setapppassword -password key
----------
peoplepicker-searchadcustomquery
Allows the administrator to set the custom query that is sent to Active Directory.
For example, we could set it to
stsadm.exe -o setproperty -pn peoplepicker-searchadcustomquery -pv "(physicalDeliveryOfficeName={0})"
------------
peoplepicker-onlysearchwithinsitecollection
This will restrict the picker to only people and groups that are in the site collection.

Exclude list views from search scope in Sharepoint

My search results show list views also while searching for a documents apart from real document name. i didnot want users to see the source of the document or source url.
for eg: it was showing http://sitename/listname/Forms/AllItems.aspx

fix: create new crawl rule from sharepoint search administration SSP not from search administration scope (Shared Services Administration: SharedServices1 > Search Administration > Crawl rules).
1) click on New Crawl Rule > in Path enter *://*allitems.aspx*> make sure exclude is selected> click OK
2) go to content sources in Search adminisration >select the content source > do a full crawl

do a search list view will not show in search results. you can do the same for all list views including custom list views and also i added *://*DispForm.aspx*

Change Service Accounts & Passwords for MOSS2007

For reference article microsoft

http://support.microsoft.com/kb/934838

run commands
stsadm -o updatefarmcredentials -identitytype NetworkService
iisreset

this didn't work for me even i changed the identity from IIS application pool property. no luck

FIX:
  1. Go to Sharepoint Central Administration.
  2. On the top navigation bar, click Operations.
  3. On the Operations page, in the Security Configuration section, click Service accounts.
  4. On the Service Accounts page, in the Credential Management section, under Select the component to update, select Web application pool.
  5. In the Web service list, click a Web service.
  6. In the Application pool list, click the application pool that you want associated with the Web application.
  7. Under Select an account for this component, select one of the following:
  8. Predefined. Select this option to use a predefined account, such as the Network Service account or the Local Service account.
  9. Configurable. Select this option to specify a different account.
  10. Click OK.

other references:
http://geekswithblogs.net/influent1/archive/2009/04/15/131231.aspx
http://ithinksharepoint.blogspot.com/2008/10/renaming-user-accounts-within.html

Monday, September 5, 2011

BizTalk : The published message could not be routed

when working with flat file in recieve port . don't forget to configure the send port filter to BTS.ReceivePortName = <receive port name>
otherwise biztalk will give error message

A message received by adapter "FILE" on receive location "Receive Location1" with URI "\\share\FileReceive\*.xml" is suspended.
 Error details: The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure. 
 MessageId:  {xxx...........}
 InstanceID: {xxx...........}


A subscriber is an orchestration or send port with a filter that matches the promoted properties in the message.if it is not configured when using flat file schema you get the above message.

BizTalk - WcfSendPort - BtsActionMapping - is invalid

I have been getting the below error when sending request message to oracle db from biztalk 2009 R2

The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_SCHEMA_View_VIEWNAME_Custom" with URL "oracledb://CONNECTIONSTRING/". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.MetadataException: Argument <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Operation Name="Select" Action="
http://Microsoft.LobServices.OracleDB/2007/03/SCHEMA/View/VIEWNAME/Select" />
</BtsActionMapping> is invalid.

Server stack trace:
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".


Scenario: i auto generated schema from oracle db view. created orchestration(file receive-db req-db resp - transform(for final resp) - final response). deployed on biztalk 2009 successfully.
created output instance from the adapter generated schema with root reference "Select"

<ns0:Select xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/SCHEMA/View/VIEWNAME">
  <ns0:COLUMN_NAMES>*</ns0:COLUMN_NAMES>
  <ns0:FILTER></ns0:FILTER>
</ns0:Select>

used this xml in file receive location.in db req stage it is stuck . checked the binding, everything is fine since i imported the binding from the project i never suspected the <BtsActionMapping> tag.
changed EnableBizTalkCompatibiltyMode to True & UseAmbientTransaction to False. still no luck.
created a new DB request-response port removed the imported binding port.changed EnableBizTalkCompatibiltyMode to True & UseAmbientTransaction to False.didn't forget to set credentials username in CAPS,in SOAP Action header added only

http://Microsoft.LobServices.OracleDB/2007/03/SCHEMA/View/VIEWNAME/Select
without <BtsActionMapping> tag.

tried again

voila it works!!!