【问题标题】:Silverlight RIA services, Prism modularity and moving servicesSilverlight RIA 服务、Prism 模块化和移动服务
【发布时间】:2011-08-05 15:56:30
【问题描述】:

我正在使用 Prism,因此我可以创建模块化解决方案。我需要在我的模块中访问 WebContext 和 AuthenticationService 并相信最好的方法是将自动生成的 AuthenticationService 和 UserRegistrationService 移动到共享项目中。我已经根据我的需要创建了我创建的共享项目以及实体模型和域服务。

谁能给我一些关于移动业务应用程序项目中创建的服务的建议?我已经尝试过了,移动了相关资源、部分类等,但无法构建它。命名空间意大利面条让我失望。

我也有一系列警告,例如

命名空间中的元素“ItemGroup” 'http://schemas.microsoft.com/developer/msbuild/2003' 无效 命名空间中的子元素“RiaClientCodeGenClientAssemblySearchPath” 'http://schemas.microsoft.com/developer/msbuild/2003'。列表 预期的可能元素:'项目,参考,COMReference, COMFileReference、Xdcmake、Bscmake、ClCompile、ClInclude、Midl、 ResourceCompile、PreLinkEvent、CustomBuildStep、Manifest、 ProjectConfiguration、NativeReference、ProjectReference、编译、 EmbeddedResource、Content、Page、Resource、ApplicationDefinition、 无、BaseApplicationManifest、文件夹、导入、服务、WebReferences、 WebReferenceUrl、FileAssociation、BootstrapperFile、PublishFile、 CodeAnalysisDependentAssemblyPaths、CodeAnalysisDictionary、 CodeAnalysisImport、Link、ResourceCompile、PreBuildEvent、 命名空间中的 PostBuildEvent' 'http://schemas.microsoft.com/developer/msbuild/2003'。 C:\程序 Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets

这有点令人担忧。如果我最终能够建造它,它们可能会神奇地消失!

【问题讨论】:

    标签: silverlight module prism wcf-ria-services


    【解决方案1】:

    好的,如上所述,我创建了一个新的 AuthenticationService 而不是移动和使用的东西

    <Application.ApplicationLifetimeObjects>
    <riaservices:WebContext>
      <riaservices:WebContext.Authentication>
        <appsvc:FormsAuthentication>
          <appsvc:FormsAuthentication.DomainContext>
            <websvc:AuthenticationContext />
          </appsvc:FormsAuthentication.DomainContext>
        </appsvc:FormsAuthentication>
      </riaservices:WebContext.Authentication>
    </riaservices:WebContext>          
    

    在 app.xaml 中进行配置。您必须删除原始 silverlight 和 web 项目之间的链接,以防止在原始业务项目上创建 webcontext。

    我最终移动了资源、视图等以及我想要业务应用程序模板附带的登录表单等。这有点费力,我确信有一种更简单的方法 - 还不知道那是什么,但是当我需要再次这样做时,我会尝试不同的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-06
      相关资源
      最近更新 更多