in

Community Blogs

Blogs of different SQL/Developers Community Members

This Blog

Syndication

DamirDobric

ožujak 2010 - Posts

  • BizTalk Server 2010 Name Change Q&A

     

    Q: Why was the original name for the release BizTalk Server 2009 R2?

    BizTalk Server 2009 R2 was planned to be a focused release to deliver support for Windows Server 2008 R2, SQL Server 2008 R2 and Visual Studio 2010. Aligning BizTalk releases to core server platform releases is very important for our customers. Hence our original plan was to name the release as BizTalk Server 2009 R2.

    Q: Why did Microsoft decide to change the name for BizTalk Server 2009 R2 to BizTalk Server 2010?

    Over the past year we got lot of feedback from our key customers and decided to incorporate few key asks from our customers in this release. Based on customer value we are delivering and positive feedback we are getting from our early adopter customers we feel the release has transitioned from minor release (BizTalk Server 2009 R2) to a major release (BizTalk Server 2010).

    Following is list of key capabilities we have added to the release

    1. Enhanced trading partner management that will enable our customers to manage complex B2B relationships with ease

    2. Increase productivity through enhanced BizTalk Mapper. These enhancements are critical in increasing productivity in both EAI and B2B solutions; and a favorite feature of our customers.

    3. Enable secure data transfer across business partners with FTPS adapter

    4. Updated adapters for SAP 7, Oracle eBusiness Suite 12.1, SharePoint 2010 and SQL Server 2008 R2

    5. Improved and simplified management with updated System Center management pack

    6. Simplified management through single dashboard which enables IT Pros to backup and restore BizTalk configuration

    7. Enhanced performance tuning capabilities at Host and Host Instance level

    8. Continued innovation in RFID Space with out of box event filtering and delivery of RFID events

    Q: Is there any additional benefit to customers with name change to BizTalk Server 2010?

    In addition to all the great value the release provides, customers will benefit from support window being reset to 10 years (5 years mainstream and 5 years extended support). This highlights Microsoft’s long term commitment to BizTalk Server product.

    Q: What is the RTM date for BizTalk Server 2010? Will this change impact the RTM dates?

    We are on schedule to deliver BizTalk Server 2010 in H1 FY11 (H2 CY2010). This name change will not impact the RTM dates.

  • Crazy SharePoint error

    First of all welcome to one of thousands of posts with this error. If this is not your very first hit, you might already be frustrated. In this case I hope this post will help you at least a bit.

    So, you are probably reading this, because you have got this error:

    Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

    I get this error these days (years) only when working with SharePoint and some kind of service like WCF or even service implemented in ASH-handler.

    As you expect, this error description should describe, what happened? You are right. It means the Debugger is unable to read anything as  the message “says”. This message unfortunately does not contain any meaningful information. If you are developer of one API and want to make crazy anybody who calls into your API do following:

    System.Threading.Thread.CurrentThread.Abort();

    This is what SharePoint does implicitly somewhere deep in the COM world in the library C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\OWSSVR.DLL.

    When the tread is dead, it means that you cannot read anything else on the stack as shown in the following picture.

    image

    This picture shows what happens when you step over (F10) line 2. If you set breakpoint on line 1 and press F5 no Thread Abort will be called. Instead, the line 5 will not be executed because web.CurrentUser is not set. Exactly this fact (CurrentUser = null) causes the SharePoint to crash!

    1. using (SPWeb web = initializeSite.OpenWeb())
    2. {
    3.  
    if (web.CurrentUser != null)
    4.   {
    5.     . . .
    6.   }
    7. }

    ASP.NET Impersonation

    So to fix this, you need to setup Windows Authentication and Impersonation in your web.config file

    <authentication mode="Windows" />
    <identity impersonate="true"/>

    WCF Impersonation

    If you are working wit WCF Web Services then additionally following has to be set, but previous two line not necessarily:

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

    Additionally the WCF service has to be styled as follows:

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class MyService : IMyService

    Additionally WCF impersonation can be done imperatively too as shown here.

    Anonymous Impersonation

    However most interesting question is how to do impersonation, which is required  by MOSS, if the current user is anonymous user?
    Anonymous authentication in IIS 7.0 and 7.5 is enabled as follows:

    image image

    In IIS 6 this looks like:

    image

    To make this working you have to understand that that COM model behind SharePoint at some point of time does this:

    if(HttpContext.User.Identity.IsAuthenticated). . .

    If the User Property is not set or Identity is not set or it is set but not authenticated, nothing will work. To illustrate how to fix this I used a service implemented in ASHX handler.

    [WebService(Namespace = http://daenet.eu/DeepZoomExplorer)]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class DeepZoomHandler : IHttpHandler
    {
      
    private IRequestParser m_RequestParser = new HttpArgumentParser();

      
    public void ProcessRequest(HttpContext context)
       {
         
    WindowsPrincipal wP = new WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent());
          HttpContext.Current.User =
    Thread.CurrentPrincipal = wP;
       }
    }


    The code shown above can be used in and ASPX page too. Note that SharePoint does not rely on Thread.CurrentPrincipal. Because of this setting of CurrentPrincipal is even not necessary. You could just use HttpContext.Current.User  = wP.

    I set CurrentPrincipal, because it should be used, I think. That is how .NET Framework works and should work. So, the best is set both and you will be sure that any security provider in MOSS tomorrow will work with this, we hope at least.

     

    Damir

  • Usage of CSD Technologies

    Few days ago I had more than 100 attendees in the WCF/WF talk in .NET user group Frankfurt at Microsoft office in Bad Homburg - Germany. Because of obviously high interest of developers for Connected Systems Division technologies we decided to setup a simple survey. The survey has a goal to show the usage of most popular CSD technologies and other related topics like Visual Studio and .NET.

    Following diagram shows how intensive some technologies are used in comparison to Visual Studio 2008, which is used by all 100% attendees.

     

    image
    The table below shows the same result in a table form:

    0,97297297 I already use WCF 3.0/3.5  
    0,7027027 I’m planning to use WCF 4.0  
    0,10810811 I already use WF 3.0/3.5  
    0,43243243 I’m planning to use WF 4.0  
    0,24324324 I already use.NET 4.0  
    1 I use .NET 3.0 and Visual Studio 2008  
    0,37837838 I use .NET 4.0 and Visual Studio 2010 RC  
    0,10810811 I’m already playing with AppFabric BETA 1  
    0,10810811 I already use AppFabric Beta 2  
    0,02702703 I use Declarative Workflow Services 4.0 with AppFabric  
    0,05405405 I use Declarative Workflow Services 4.0 without AppFabric  
    0 I use caching features (Velocity) with AppFabric  
    0,02702703 I use caching features (Velocity) without AppFabric  
    0 I already use Windows Azure  
    0,13513514 I use BizTalk Server  
    0 I use Internet Service Bus  
    0,08108108 I use WCF REST starter kit  
    0,27027027 I use SOAP messaging based on WCF  

    Another interesting question was related to usage of SOAP messaging versus REST.

    image

    Hope these numbers helps you a bit to understand what other developers and architects use and plan to use.
    Thanks for all attendees who have participated on this survey.

     

    Damir

  • User Impersonation in WindowsForms and WPF

    Following example shows how to enforce interactive user in Windows Forms or WPF applications to become WindowsPrincipal, which can be read by Thread.CurrentPricipal:

      // This is identity of the user interactivelly logged on.
     
    WindowsIdentity currentIdentity = WindowsIdentity.GetCurrent();

      // This would be required if you would logon user by username and password.
      // This example shows how to impersonate some other user than the interactive one.
      //
    WindowsImpersonationContext ctx = currentIdent.Impersonate();

      
      // This two calls make the all magic.

      WindowsPrincipal wP = new WindowsPrincipal(currentIdent);

     
    Thread.CurrentPrincipal = wP;

  • Troubleshooting DeepZoom

    My Browser crashes when opening DeepZoom image

    image

    One of following red-marked attributes can cause the browser to crash. TileSize has to have expected number. If images have been generated with TileSize=256
    and attribute in output.xml is set on 8 then the browser will crash.
    Attribute N must be uniquely specified.

    <Collection MaxLevel="8" TileSize="8" Format="jpg" NextItemId="16" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">

    <I Id="9" N="" Source="output_images/Derventa.xml">
       <Size Width="2048" />
       <ViewPort Width="6" X="-3,5" Y="-8,5" />
    </I>
    . . .

     

    Some Images are not shown

    The attribute Height and Width has to be set or not specified. If specified then they have to have values.
    Following height means zero.

    <I Id="9" N=”1” Source="output_images/Derventa.xml">
       <Size Width="2048" Height="" />
       <ViewPort Width="6" Height="" X="-3,5" Y="-8,5" />
    </I>
    . . .

    Some images are shown as Black-Box

    The source file (i.e. output.xml) contains more than one image (element ‘I’) with the same identifier ‘N’.

    <I Id="9" N="9" Source="output_images/Derventa.xml">
       <Size Width="2048" Height="1360" />
       <ViewPort Width="6" Height="6" X="-3,5" Y="-8,5" />
    </I>
    <I Id="10" N="10" Source="output_images/Frankfurt.xml">
       <Size Width="2048" Height="1360" />
       <ViewPort Width="6" Height="6" X="-3,5" Y="-9,5" />
    </I>
    <I Id="11" N="9" Source="output_images/Prag.xml">
       <Size Width="2832" Height="2128" />
       <ViewPort Width="6" Height="6" X="-3,5" Y="-10,5" />
        </I>

    Unexpected images shown at specific zoom level

  • AppFabric Error: A base address with the uri scheme 'net.pipe' needs to be specified…

    When setting up your service, you may figure out, that service has not been properly started. To make sure, that this statement is true open the AppFabric event log and enable Operational logging. Clear all log entries and start the service.
    If the service is autstartable stop the pool before clearing of the event log. Now start the service and look for the error shown below:

    System.ServiceModel.ServiceActivationException: The service '/Services/RoutingService/ServiceManagement.svc' cannot be activated due to an exception during compilation. The exception message is: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application.. ---> System.Configuration.ConfigurationErrorsException: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application. at Microsoft.ApplicationServer.Hosting.Configuration.ServiceManagementConfiguration.LoadAndVerifyEndpoints(HashSet`1 enabledUriSchemes, HashSet`1 configuredEndpoints) at Microsoft.ApplicationServer.Hosting.Configuration.ServiceManagementConfiguration.GetEnabledEndpoints(Uri[] baseAddresses) at Microsoft.ApplicationServer.Hosting.Management.ServiceManagementFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) --- End of inner exception stack trace --- at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) at Microsoft.ApplicationServer.Hosting.AutoStart.ApplicationServerAutoStartProvider.ActivateService(String virtualPath)


    The most important part of the messages is marked bold. To fix this you need to enable net.pipe protocol as shown at the next picture:

    clip_image002

    Note that http is scoped as default protocol, but it also has to be explicitly specified. If after this the error still appears, be sure that net.pipe protocol is enabled at the site binding in IIS manager. I figured out that this binding is sometimes not automatically enabled for site after installation of AppFabric.

     

    Hope this helps


    Damir

     

    image

    Posted ožu 04 2010, 11:38 by anonymous
    Filed under: ,
  • AppFabric BETA 2: The Platform for the Cloud Era

    If you are still asking yourself, what is the AppFabric, take a look on these few key features described below. After almost two years the Microsoft’s new product is getting to be released soon (Q3 2010). For now we are announcing the publicly available BETA 2 version, which is build on top of .NET 4.0. If you already have installed BETA 1 version please take a look on this post.

    Simplified Composite Apps (Built on top of .NET 4.0)

    Developers can simplify the development of composite applications with the pre-built application services in Windows Server AppFabric, used in conjunction with Visual Studio tools and .NET Framework capabilities (ASP.NET, WCF and WF). IT Pros can also simplify the deployment, monitoring, and management of composite applications with configuration and monitoring capabilities that are integrated with familiar tools (PowerShell, IIS Manager, and System Center).

    Faster Web Apps Made Easy (Known as Velocity)

    Windows Server AppFabric helps developers improve the speed and availability of web applications through distributed in-memory caching and replication technology that works with current ASP.NET applications.

    Enterprise Performance and Availability (Known as Dublin)

    An enterprise’s most important and demanding applications can achieve elastic scale, performance, availability, and reliability (benefits often associated with the cloud) with the help of Windows Server AppFabric. These and countless other benefits from an unparalleled partner ecosystem utilize familiar skills from the .NET Framework and Windows Server.

    Additional Resources:

    Gartner Research Report: Microsoft AppFabric: A Platform for the Cloud Era is Under Construction

    http://www.gartner.com/technology/media-products/reprints/microsoft/vol13/article6/article6.html

    Microsoft News Center feature story on Windows Server & Windows Azure platform AppFabric:

    http://www.microsoft.com/presspass/features/2009/nov09/11-17pdcappfabric.mspx

    Beta2 Blog Post on Windows Server Blog:

    http://blogs.technet.com/windowsserver/

    Additional information on Windows Server AppFabric:

    http://www.microsoft.com/windowsserver2008/en/us/app-main.aspx

    Information (including download link) for Windows Azure AppFabric:

    http://www.microsoft.com/windowsazure/appfabric/

Copyright of SQL/Developers Community
Powered by Community Server (Commercial Edition), by Telligent Systems