Showing posts with label Troubleshotting. Show all posts
Showing posts with label Troubleshotting. Show all posts

Friday, November 5, 2010

CustomBinding binaryMessageEncoding error, Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

this is an Issue about the WCF Bindings. By default, if you use wshttpbinding or httpbinding, The http channel will use the Text based encoding which is not very efficient in terms of the network transfer.  however, you can combine one custombing, just pick up the binaryencoding which is been used by tcpbinding, and httptransfer as the transport channel.

you can create one customBinding like this,

<customBinding>
       <binding name="csbinding">

         <binaryMessageEncoding>
         </binaryMessageEncoding>

         <httpTransport>
         </httpTransport>

       </binding>
     </customBinding>


if the service is hosted in IIS, and the anonymous access for this folder has been turned off.  you may get the follow error when you try to access the svc. even just the wsdl access.


erver Error in '/DemoWCF' Application.

Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NotSupportedException: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.]
System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener) +11449553
System.ServiceModel.Activation.VirtualPathExtension.ApplyHostedContext(TransportChannelListener listener, BindingContext context) +75
System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener(BindingContext context) +119
System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +66
System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener(BindingContext context) +67
System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelListener(BindingContext context) +46
System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +66
System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +124
System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +337
System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +647
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +1364
System.ServiceModel.ServiceHostBase.InitializeRuntime() +37
System.ServiceModel.ServiceHostBase.OnBeginOpen() +27
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +49
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

[ServiceActivationException: The service '/DemoWCF/Service.svc' cannot be activated due to an exception during compilation. The exception message is: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11527290
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75




for the fix. just right click the .svc file in IIS and enable the anonymous access.

Tutorial , Firebug , Free Commercial IE httpwatch alternative

HttpWatch is a great Commercial Tool to capture the Http traffic, enable admin to do the user end http analysis. like check the Cache is correct, client did get the Gzip version response. If you are looking for a free alternative.  FireBug for fixfox is my top choice.  Here is a basic tutorial one Firebug.

Install Firebug on Firefox.
Click tools->add-ons, search firebug. click to install the add-on and restart firefox.

image

After loaded the firebug, Open Firefox, press F12 or click add-ons to turn it on.

View the Http Request /Response Header. Click the dropdown arrow to enable the traffic capturing.
image

When you access Wikipedia mainpage, http://en.wikipedia.org/wiki/Main_Page, you will see the resource get requested to web servers. and the timeline.

image

click one url , i.e the first one. you can tell the server is apache, the wiki used Cache heavily. here the cache could be squid or varnish.  the we do get the gzip version response.

image 
scroll down, you can see the request header the firefox is sending out.
image

If you press Shift and click the refersh in firefox. you will see that the firefox tell the edge server to reload th request and never pickup the cached version.
image

in the HTML tab, click the pointer to a object like the logo here., you can see the img url and css styles.
image

Tuesday, October 26, 2010

asp.net mvc, CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

after I located the Entity framework connection string, Unable to load the specified metadata resource. continued reading the professional asp.net mvc 2 to page 48. When I try to run the details page. /controller/details/validid
get the following error,

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:

Line 170:
Line 171: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 172: public class views_dinners_details_aspx : System.Web.Mvc.ViewPage<LADinner.Models.Dinner>, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler {
Line 173:
Line 174: private static bool @__initialized;

Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_Web_details.aspx.32d6c807.yjqx_sl8.0.cs    Line: 172
the stack trace shows when runtime try to compile the .aspx page using the csc.exe, missed one assembly reference System.Data.Entity.

then I click the detailed compiler output  , I get the following outputs. and Highlighted the System.Data.X assemblies. the error is right, there is no reference to System.Data.Entity.

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll"
/R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_global.asax.4lhx-qfz.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll"
/R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_Web_3rrpychx.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Abstractions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Abstractions.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll"
/R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\assembly\dl3\452a723b\f0bfe800_2e75cb01\NerdDinner.DLL"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll"
/R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mvc\2.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll"
/R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Routing.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_Web_details.aspx.32d6c807.yjqx_sl8.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_Web_details.aspx.32d6c807.yjqx_sl8.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f41f3cb9\3196a0b\App_Web_details.aspx.32d6c807.yjqx_sl8.1.cs"
Then I did some research. Though we added the assembly System.Data.Entity into our project. which means that those assembly are only for Runtime reference. For Compile time reference, We have to add the reference to System.web/Compilation/Assemblies in web.config, then the csc will pick up this settings

Like

<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>

Monday, October 25, 2010

Troubleshooting Entity framework connection string, Unable to load the specified metadata resource.

I was reading the Book called Professional MVC 2 , following the tutorial to Page 44.

When I run the application, /Details/id, which will invoke the Entity framework to do a DB query. No luck, get an strange error.

Line 37:         /// Initializes a new nerdDinnerEntities object using the connection string found in the 'nerdDinnerEntities' section of the application configuration file.
Line 38:         /// </summary>
Line 39:         public nerdDinnerEntities() : base("name=nerdDinnerEntities", "nerdDinnerEntities")
Line 40:         {
Line 41:             this.ContextOptions.LazyLoadingEnabled = true;

[MetadataException: Unable to load the specified metadata resource.]
   System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +2490148
   System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +170
   System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +8517824
   System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths) +271
   System.Data.Common.Utils.<>c__DisplayClass2.<Evaluate>b__0() +19
   System.Data.Common.Utils.Result.GetValue() +100
   System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg) +181
   System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) +292
   System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() +29
   System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor) +205
   System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +27
   LADinner.Models.LaDinnerEntities..ctor() in C:\NerdDinner\Models\LaDinners.Designer.cs:39
   LADinner.Models.DinnerRepository..ctor() in C:\NerdDinner\Models\DinnerRepository.cs:10
   LADinner.Controllers.DinnersController..ctor() in C:\NerdDinner\Controllers\DinnersController.cs:14

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
   System.Activator.CreateInstance(Type type) +6
   System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +491

[InvalidOperationException: An error occurred when trying to create a controller of type 'LADinner.Controllers.DinnersController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +628
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +204
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +193
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +160
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +80
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +45
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841400
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Then I check the web.config.  the connection string is there.

<connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.;Integrated Security=SSPI;database=aspnetdb;trusted_connection=true" providerName="System.Data.SqlClient"/>
    <add name="NerdDinnerEntities" connectionString="metadata=res://*/NerdDinner.Models.NerdDinners.csdl|res://*/NerdDinner.Models.NerdDinners.ssdl|res://*/NerdDinner.Models.NerdDinners.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.;Initial Catalog=NerdDinner;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/></connectionStrings>

So the runtime will read some resource file embedded in the Assembly. So are the name correct?

I just run a ILDASM NerdDinner.DLL /out:a.il

c:\NerdDinner\bin>ildasm NerdDinner.dll /out:a.il

c:\NerdDinnerr\bin>dir
Volume in drive C is BOOTCAMP
Volume Serial Number is 7CA9-BE94

Directory of c:\NerdDinner\bin

10/25/2010  05:23 PM    <DIR>          .
10/25/2010  05:23 PM    <DIR>          ..
10/25/2010  05:23 PM           173,811 a.il
10/25/2010  05:23 PM               824 a.res
10/25/2010  05:19 PM            31,232 NerdDinner.dll
10/25/2010  05:19 PM            46,592 NerdDinner.pdb
10/25/2010  05:23 PM             2,298 Models.NerdDinners.csdl
10/25/2010  05:23 PM             1,205 Models.NerdDinners.msl
10/25/2010  05:23 PM             2,066 Models.NerdDinners.ssdl
               7 File(s)        258,028 bytes
               2 Dir(s)   5,624,713,216 bytes free

Here, for those resource file, Pay attantion to the filename. this is no Assmebly name as the prefix.
Models.NerdDinners.csdl Instead of NerdDinner.Models.NerdDinners.CSDL which is defined in the web.config

so remove the nerddinner in web.config , that’s the trick to fix the problem

<connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.;Integrated Security=SSPI;database=aspnetdb;trusted_connection=true" providerName="System.Data.SqlClient"/>
    <add name="NerdDinnerEntities" connectionString="metadata=res://*/NerdDinner.Models.NerdDinners.csdl|res://*/NerdDinner.Models.NerdDinners.ssdl|res://*/NerdDinner.Models.NerdDinners.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.;Initial Catalog=NerdDinner;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/></connectionStrings>

Friday, October 1, 2010

550 5.7.1 Unable to relay for name@domain.com System.net.mail

one day, the ASMX web service can’t send email any more. When I run a cordbg and attached to the W3wp. turn on to catch all unhandled exception, “ca e”

first, get CDO Exception. then continue, get the error like

550 5.7.1 Unable to relay for name@domain.com

then I change different TO Address, no luck , still the same error.

the Service just a wrapper of  the System.net.mail to send email , and uses a local SMTP server.

it looks like that’s a fat finger issue. When I turn on the Relay setting of the smtp server.

I get the following settings as shown.

image

which means that all relay will be denied. unless you specify it in the exception list.

then just switch it back.

image

Thursday, September 16, 2010

Clickonce deployment exception, System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment

Clickonce is one new features in .net framework 2.0 which make app deployment easy. Just right click you project, select the files and version. the framework will take care the auto updating and initial one-demand setup.

at one day, I get some problem like this.
  t4

or some user might get different error like this

RROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://appserver/app/Client/xxxx.application resulted in exception. Following failure messages were detected:
        + Value does not fall within the expected range.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [9/16/2010 8:51:30 AM] : Activation of http://appserver/app/Client/xxxx.application has started.
    * [9/16/2010 8:51:30 AM] : Processing of deployment manifest has successfully completed.

ERROR DETAILS
    Following errors were detected during this operation.
    * [9/16/2010 8:51:30 AM] System.ArgumentException
        - Value does not fall within the expected range.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
            at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
    * Transaction at [9/16/2010 8:51:30 AM]
        + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
            - Status: Set
            - HRESULT: 0x0
        + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
            - HRESULT: 0x0

When I run the cordbg and attach to the dfsvc.exe . the stack trace tells somthing different.  no signature
image

all these errors are caused by one fact that the filed downloaded by click once are “Broken”, either file is deleted or the signature is incorrect.( for example, you download the file from http://servera/, then next time same file is downloaded from the loadbalancer. http://loadbalancer/ or http://virtualIP/

Fix is easy. Go to the default once click app file location.
windows 7 will be C:\Users\[userid]\AppData\Local\Apps\2.0
xp or 2003 C:\Documents and Settings\[userid]\Local Settings\Apps\2.0

delete all those folders in that path.

try to install and run the app again, the issue will disappear.  It looks like the pre-determined state of click once is broken.

Friday, July 16, 2010

IE8 JavaScript is disabled / not running after remove McAfee folder ACL

One day, JavaScript will not run on my IE .  how to make sure javascript works? here is the step to run the helloworld test. [ Open a webpage, like google.com, then put “ javascript:alert(“hello world”) “ in the address bar , and click enter. you should get a prompt window if java script works.]

finally, I find it was caused by the McAfee ACL setting. Here is the story,

I just want to disable the McAfee temporally, the easy way is to remove all ACL on the folder, then nobody else can access the folder. for sure, the service fail to start when I reboot the PC.

image


    Then when you try the helloworld test. Nothing returns. Javascript is disabled, it might be  caused by Mcfee indirectly or directly.

to fix it,
         1. Add back the ACL. 
         2. The jscript.dll might be unregistered. run “regsvr32 jscript.dll” in the runbox to make sure it is registered

 
Locations of visitors to this page