添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi all,
I'm working with Sequential WindowsWorkFlow.xamlx, once I want to run the Workflow, it's keep giving error "Keyword not supported: 'metadata'."

I checked the connection string and it is as below:

<add name="MyEntities" connectionString="metadata=res://*/ENT.csdl|res://*/ENT.ssdl|res://*/ENT.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=****;initial catalog=****;user id=***;password=****;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />  
												

@Khalid Salameh , which database you want to connect, sql server or other database? If you want to connect to sql server database with sql server Authentication, you can check if the following connection string works for you:

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;  

Where did you see the metadata? Can you provide some links or docs about it?

Hi cooldadtx, thanks for your reply, please check the below error if it is help you, it is occurred once I make the WorkFlow project as startup project and run it.

Error: Cannot obtain Metadata from http://localhost/MyProject/ManageWorkFlowActions.xamlx If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing ...
Error    URI: http://localhost/MyProject/ManageWorkFlowActions.xamlx    Metadata contains a reference that cannot be resolved: 'http://localhost/MyProject/ManageWorkFlowActions.xamlx'.    The requested service, 'http://localhost/MyProject/ManageWorkFlowActions.xamlx' could not be activated.
												

That makes more sense. You mentioned that this was a WWF project but it appears it is looking for the XAMLX in a web project and that wouldn't exist. But I'm curious if this has anything to do with your entity stuff at all but rather an issue with your WWF project. Can you clarify the type of project you're building? Also I'm wondering if you might have renamed the file but the underlying type and references are still using an old name. How did you rename the file, if you did?

Dear cooldadtx,

I will provide the case in details, it could be better..
I have Workflow in a web project with webConfig file.

Now in webConfig I have this section:

If I will comment this section <behavior>....</behavior>... then I will get this error:

I fixed by add the connection string to below files:

  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
  • Now after I added the connection string to above files, I got this error:

    I tried to fixed by below steps:
    Reference: https://sites.google.com/site/danmiaoaustralia/ASPNET/resolve-an-error-system-activities-durableinstancing-createlockowner

    osql -E -S MyServer -d DBName -i C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en\SQLWorkflowInstanceStoreSchema.sql
    osql -E -S MyServer -d DBName -i C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en\SQLWorkflowInstanceStoreLogic.sql

    but I got this message:

    Sorry for late, I hope it is a good explanation

    First things first, you should never edit the machine.config file. You need to remove any changes you made to those files.

    Now in your web.config file you should have a section for connection strings and that is where the initial error is coming from. Take the connection string line you put in your machine.config and put it in your web.config instead.

    The next issue is configuring the persistence store as documented here. The command you tried to run looks reasonable but the error you're getting is that you're trying to use a login to run the command and that login won't work because it is not on the same domain. To run those commands you'll need to include login information for an account that has the necessary permissions on that DB. You can pass the username using the -U parameter and the password using -P. If your local Windows account has permission then use -E instead.

    Once that is done use SQL Server Object Explorer to confirm the DB tables are properly set up and run your app again.

    Hi cooldadtx, I tried as you mentioned to remove the connection string from machine.config and move it to config file..
    Now I got this error:

    After I searched on this error, I found it is related to AppFabric configuration but I don't know how to fix it..

    At this point I believe you should post a new question in the forums about this. This thread was really about helping you get past the bad connection string issue you were having. It appears you are now past that so a separate post related to the WF instance account would be better. I know nothing about that area but my understanding is that the account you specify needs to have access to it and based upon your error that account does not exist in your database you specified earlier. You should confirm the account you are trying to use has the necessary permissions to the DB you're connecting to. Here's the related docs on that topic that might help you get started.

    I tried this also:
    osql -S <server_name> -U sa -P <password> -d <database_name> -i C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en\SQLWorkflowInstanceStoreSchema.sql

    still given "Login failed for user 'sa' "

    I guess you should have an entry in the <services> section of your web.config too, something like :

       <service name="ManageWorkFlowActions">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="pdp_basicHttpBinding" contract="IManageWorkFlowActions" />
      </service>
    

    where "IManageWorkFlowActions" is a placeholder for the name of the Interface implementing your service.

    If you used the right workflow template to develop your application this entry should have been inserted automatically in your web. config ....