Namespace doesn't show in web service - namespaces

I have a WCF-Custom Transport Type Receive Location in BizTalk and the URI goes like https://productionenv.com/TPService/WcfService_TP_Orchestrations.svc.
The Binding Type is wsHttpBinding and Security Mode is Transport. And in serviceMetadata the httpsGetEnabled is set True.
However when I open its corresponding web service in IE, the expected namespaces which I've created does not show like below:
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<wsaw:UsingAddressing />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:import namespace="http://www.microsoft.com/biztalk/2006/r2/wcf-adapter" location="https://productionenv.com/TPService/WcfService_TP_Orchestrations.svc?wsdl=wsdl0" />
Perhaps is there anything I missed in web.config part or the WCF-Custom Receive Loc itself that causes this issue?

Related

Can't use EWS UpdateItem operation from Outlook add-in

I'm am trying to update a dictionary element in the IPM.Configuration.OWA.UserOptions message using an UpdateItem via an EWS (SOAP) request from an Outlook web add-in with ReadWriteMailbox permissions. However it is failing with the following error in the response:
ErrorAccessDenied: Office extension is not allowed to update this type of item.
The UpdateItem request I'm using is a fairly straightforward example of updating a message by it's ID and setting the value of an extended property:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
</soap:Header>
<soap:Body>
<m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
<m:ItemChanges>
<t:ItemChange>
<t:ItemId Id="AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MABGAAAAAACxU7lpjO+oS5hB0UfA6muFBwDcAGmTk49MRrSCdR7rvVFPAAAAAAEBAADcAGmTk49MRrSCdR7rvVFPAAD2pXuVAAA=" ChangeKey="CQAAABYAAADcAGmTk49MRrSCdR7rvVFPAAD2uhNb" />
<t:Updates>
<t:SetItemField>
<t:ExtendedFieldURI PropertyTag="0x7c07" PropertyType="Binary" />
<t:Message>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="0x7c07" PropertyType="Binary" />
<t:Value>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxVc2VyQ29uZmlndXJhdGlvbj4NCgk8SW5mbyB2ZXJzaW9uPSJFeGNoYW5nZS4xMiIgLz4NCgk8RGF0YT4NCgkJPGUgaz0iMTgtSXNGb2N1c2VkSW5ib3hPbkxhc3RVcGRhdGVUaW1lIiB2PSIxOC0wMS8wMS8wMDAxIDAwOjAwOjAwIiAvPg0KCQk8ZSBrPSIxOC1hdXRvYWRkc2lnbmF0dXJlIiB2PSIzLVRydWUiIC8+DQoJCTxlIGs9IjE4LVVzZXJPcHRpb25zTWlncmF0aW9uU3RhdGUiIHY9IjktNSIgLz4NCgkJPGUgaz0iMTgtdGhlbWVTdG9yYWdlSWQiIHY9IjE4LSIgLz4NCgkJPGUgaz0iMTgtYXV0b2FkZHNpZ25hdHVyZW9ucmVwbHkiIHY9IjMtVHJ1ZSIgLz4NCgkJPGUgaz0iMTgtdGltZXpvbmUiIHY9IjE4LUNlbnRyYWwgU3RhbmRhcmQgVGltZSIgLz4NCgkJPGUgaz0iMTgtc2lnbmF0dXJldGV4dCIgdj0iMTgtJiN4RDsmI3h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JiN4QTsmbHQ7cCZndDstLSZsdDsvcCZndDsmI3hEOyYjeEE7Jmx0O3AmZ3Q7SXp6eiBhbSBKYW5pY2smbHQ7L3AmZ3Q7JiN4RDsmI3hBOyZsdDtwJmd0OyZhbXA7bmJzcDsmbHQ7L3AmZ3Q7JiN4RDsmI3hBOyZsdDsvYm9keSZndDsmI3hEOyYjeEE7Jmx0Oy9odG1sJmd0OyYjeEQ7JiN4QTsiIC8+DQoJPC9EYXRhPg0KPC9Vc2VyQ29uZmlndXJhdGlvbj4=</t:Value>
</t:ExtendedProperty>
</t:Message>
</t:SetItemField>
</t:Updates>
</t:ItemChange>
</m:ItemChanges>
</m:UpdateItem>
</soap:Body>
</soap:Envelope>
The 0x7c07 property I'm updating in the UserOptions message contains a base64 encoded value of various signature related dictionary properties that I've modified:
<?xml version="1.0" encoding="utf-8"?>
<UserConfiguration>
<Info version="Exchange.12" />
<Data>
<e k="18-IsFocusedInboxOnLastUpdateTime" v="18-01/01/0001 00:00:00" />
<e k="18-autoaddsignature" v="3-True" />
<e k="18-UserOptionsMigrationState" v="9-5" />
<e k="18-themeStorageId" v="18-" />
<e k="18-autoaddsignatureonreply" v="3-True" />
<e k="18-timezone" v="18-Central Standard Time" />
<e k="18-signaturetext" v="18-
--
Izzz am Janick
" />
<e k="18-FavoriteFolders" v="1-18-3-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEMAAA=-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEJAAA=-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEPAAA=" />
<e k="18-IsOptimizedForAccessibility" v="3-False" />
<e k="18-IsFocusedInboxEnabled" v="3-True" />
<e k="18-NewEnabledPonts" v="9-2147401727" />
<e k="18-signaturehtml" v="18-<html><head></head><body><p>&nbsp;</p><p>--</p><p>John Doe</p><p>&nbsp;</p></body></html>;" />
</Data>
</UserConfiguration>
I can't find any documentation that states what is allowed or not allowed with UpdateItem operations (the list should be here). Updating the Outlook Online signature is also not currently possible with Graph or the Mail API. If what I'm trying to do ultimately cannot work then I just wasted 40+ hours of effort and will lose a client. :-|
Does anybody have any clever workarounds or know of a way to enable this operation? Note that using the EWS Managed API in server-side code is not currently an option for this solution.
Outlook does not allow add-ins to create or update FAI messages by design. In general we don't allow modifications of OWA options (or any other “service-type”, internal, item/data) directly which is probably an internal data structure, subject to change and potentially break the add-in.
If your scenario specifically requires access to outlook's signature system, I would recommend making a request to UserVoice

MSDeploy SetParameters.xml create empty value

So my question is relatively simple.
In my Parameters.xml file I have the following line:
<parameter name="SEND_TO_FRIEND_BCC" description="Email address of developer" defaultValue="" tags="">
<parameterEntry kind="XmlFile" scope"\\web.config$" match="/configuration/appsettings/add[#key='SEND_TO_FRIEND_BCC']/#value" />
</parameter>
When publish this is creating a file that ends up like this:
<setParameter value="" name="SEND_TO_FRIEND_BCC" />
When going live, this should replace the current web.config value for SEND_TO_FRIEND_BCC to an empty string. Instead, when I try an publish I get the following:
Error: The 'SEND_TO_FRIEND_BCC" argument cannot be null or empty.
Error count: 1.
at InRelease.MSDeploy.Program.Main(String[] args)
Have to tell MSDeploy that it is okay for the value to be empty ...
<parameter name="SEND_TO_FRIEND_BCC" description="Email address of developer" defaultValue="" tags="">
<parameterValidation kind="AllowEmpty" />
<parameterEntry kind="XmlFile" scope"\\web.config$" match="/configuration/appsettings/add[#key='SEND_TO_FRIEND_BCC']/#value" />
</parameter>
So, by pure chance I tried entering a single empty space and it worked.
If there is a better way I am still eager to learn more...

Disable System Ribbon in CRM 2011

I would like to conditionally disable a System Ribbon = AddNew in a CRM 2011 form with javascript. That means if the statusCode is X or Y disable the Ribbon, how could I do this?
I tryed to get the ID of the Ribbon in order to change the classname of the Ribbon to disabled, but I got Null because the Ribbons are loaded asychronously!
To expand on Anwar's answer, the key to getting this to work is to intercept and repurpose the functionality of the AddNew ribbon button, but once you do, there won't be any need for hacking the Ribbon DOM. Below are a few steps that you can take to get there.
1) Create a solution with the Application Ribbon included.
2) Find in the SDK the sample ribbon for the Application Ribbon or build it yourself using the solution included in the SDK.
\sdk\resources\exportedribbonxml
\sdk\samplecode\cs\client\ribbon\exportribbonxml\exportedribbonxml
3) Find in the Application Ribbon template the control you're interested in, which I assume in this case is the AddNew button in entity subgrids. Repurpose this control in a CustomAction and make the location of the CustomAction the same name as the control you want to repurpose.
<CustomAction Id="YourOrg.SubGrid.{!EntityLogicalName}.AddNewStandard"
Location="Mscrm.SubGrid.{!EntityLogicalName}.AddNewStandard">
<CommandUIDefinition>
<Button Id="Mscrm.SubGrid.{!EntityLogicalName}.AddNewStandard"
Command="Mscrm.AddNewRecordFromSubGridStandard" Sequence="20"
LabelText="$Resources(EntityDisplayName):Ribbon.SubGrid.AddNew"
Alt="$Resources(EntityDisplayName):Ribbon.SubGrid.AddNew"
Image16by16="/_imgs/ribbon/NewRecord_16.png"
Image32by32="/_imgs/ribbon/newrecord32.png" TemplateAlias="o1"
ToolTipTitle="$Resources(EntityDisplayName):Mscrm_SubGrid_EntityLogicalName_MainTab_Management_AddNewStandard_ToolTipTitle"
ToolTipDescription="$Resources(EntityDisplayName):Mscrm_SubGrid_EntityLogicalName_MainTab_Management_AddNewStandard_ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
4) Find in the Application Ribbon template the definition of the command of this button, and using the exact definition as the basis of a new CommandDefinition, add in your own custom rule (in this case, a new EnableRule).
<CommandDefinition Id="Mscrm.AddNewRecordFromSubGridStandard">
<EnableRules>
<EnableRule Id="Mscrm.AppendToPrimary" />
<EnableRule Id="Mscrm.EntityFormIsEnabled" />
<EnableRule Id="YourOrg.DisableNewStuff" /> <!--your custom rule-->
</EnableRules>
<DisplayRules>
<DisplayRule Id="Mscrm.ShowForOneToManyGrids" />
<DisplayRule Id="Mscrm.AppendToPrimary" />
<DisplayRule Id="Mscrm.CreateSelectedEntityPermission" />
<DisplayRule Id="Mscrm.AppendSelected" />
<DisplayRule Id="Mscrm.HideAddNewForChildEntities" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="Mscrm.GridRibbonActions.addNewFromSubGridStandard"
Library="/_static/_common/scripts/RibbonActions.js">
<CrmParameter Value="SelectedEntityTypeCode" />
<CrmParameter Value="PrimaryEntityTypeCode" />
<CrmParameter Value="FirstPrimaryItemId" />
<CrmParameter Value="PrimaryControl" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
5) Here is where Anwar's answer comes in: using both the OrRule and the ValueRule, define your EnableRule to check on the statuscodes of the entity. The linked demonstration relates to a new ribbon button, but the same rules work for repurposed ribbon controls as well.
Publish your changes when you're done and your ribbon should be all set. Because I'm not sure how familiar you are with RibbonXml, I'll also mention that Microsoft has some comprehensive walkthroughs that are pretty helpful (after much time studying them!) in picking it up.
This article explains exactly what your are looking for.
Please follow this link
How To Use "ValueRule" and "OrRule" in Ribbon Customizations - CRM 2011
This is how i hide the delete button on invoice form, based on status code, onload of the form:
var statusVal = Xrm.Page.getAttribute("statuscode").getValue();
if (statusVal==4 || statusVal==6) {
//Disable delete button
var x =top.document.getElementById("invoice|NoRelationship|Form|Mscrm.Form.invoice.Delete-Medium");
x.style.display='none';
You can get the id of the element span, which you want to hide from the source of the page.

Spring Security multiple filterChainProxy mapping/filters, custom filters Json Output

I have a part of my web application that is an RESTfull api and part a more standard web-pages.
I wish to have the REST part with some custom filters such as the EntryPoint, SuccessHandler and FailureHandler. This part is within the /rest/** mapping.
In the other hand, everything else needs to have more common filters and is mapped with /**.
The problem is to find an easy way to define the filterChainProxy with different mapping-filters.
Right now this solution doesn't work:
<!-- Normal web app -->
<http auto-config="true" use-expressions="true" authentication-manager-ref="authenticationManager">
<form-login/>
<logout/>
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" />
</http>
<!-- Configure RESTfull services -->
<http use-expressions="true" authentication-manager-ref="authenticationManager" entry-point-ref="restAuthenticationEntryPoint" >
<form-login authentication-success-handler-ref="restAuthenticationSuccessHandler" login-page="/rest/login" username-parameter="username" password-parameter="password" />
<logout logout-url="/rest/logout" />
<intercept-url pattern="/rest/**" method="GET" access="hasRole('ROLE_USER')" />
<intercept-url pattern="/rest/**" method="POST" access="hasRole('ROLE_ADMIN')" />
<intercept-url pattern="/rest/**" method="PUT" access="hasRole('ROLE_ADMIN')" />
<intercept-url pattern="/rest/**" method="DELETE" access="hasRole('ROLE_ADMIN')" />
</http>
It complains with: the univseral match being before other patterns.
Is there a way to define such a thing without resorting to define the filterChainProxy with the definition? The http version does help quite a lot to reduce the amount of configuration as I will have to manually set a UsernamePasswordAuthenticationFilter etc.
The next problem is more simple: I have to respond, after the form-login authentication with a JSON object.
So far, I have implemented a SuccessHandler (actually a version of the SimpleUrlAuthenticationSuccessHandler without the redirect part).
How do I write my JSON output?
I must have something like this:
HTTP 200 OK
with:
{"success":true,"customer {"email":"customer#email.com","session_id":"b83a41dfaca6785399f00837888886e646ff9088"}}
and a similar thing with the FailureHandler. It must be quite simple and it's surely is some very basic thing, but how do you do that? Redirecting to a custom controller is not a solution since I will have the 301 redirect status that a very simple REST client might not be able to understand.
At the very least, I wish to have only the http header and no body at all.
thanks!
If you can upgrade to Spring Security 3.1 it supports multiple chains using namespace configuration.

Making an IE8 Accelerator for my website

i have a file Accelerator.xml
<?xml version="1.0" encoding="UTF-8"?>
<os:openServiceDescription
xmlns:os="http://www.microsoft.com/schemas/openservicedescription/1.0">
<os:homepageUrl>http://www.sapo.pt</os:homepageUrl>
<os:display>
<os:name>Find on Sapo</os:name>
<os:description>Find more information on Sapo</os:description>
<os:icon>http://msdn.microsoft.com/favicon.ico</os:icon>
</os:display>
<os:activity category="Search">
<os:activityAction context="selection">
<os:execute action="http://pesquisa.sapo.pt/" method="get">
<os:parameter name="q" value="{selection}" type="text" />
</os:execute>
</os:activityAction>
</os:activity>
</os:openServiceDescription>
This not work get me a error "threre are a problem wiyh accelerator's information" when go click in button in my html to install. Why?
A few rules.
You must serve the xml file from either an http or https protocol. Clicking on the link locally with the file: protocol will not work
The url's used should all be from the same domain, so try changing the favicon url to the sapo.pt domain