Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7715331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:21:29+00:00 2026-06-01T02:21:29+00:00

I have one project which has RIAService with entity framework that is referenced to

  • 0

I have one project which has RIAService with entity framework that is referenced to my Silvelright project. so when i build project that build RIA Service project’s DLL and put that in Bin/Debug folder of Silverlight project.

Domain service function is like below

[EnableClientAccess()]
public partial class MyClassDomainService : LinqToEntitiesDomainService<MyDatabaseEntities>
{
    [Invoke]
    public void MyFunction(int Para1, string Para2, int Para3, string Para4)
    {
          //mycode
    }
}

Now i am build this porject and copy this RIAService.dll and other require DLLs to my another project is window service project.

Now in window service i am creating object of this Domain service as like below in timerQlinkRequest_Elapsed() function.

private void timerQ_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
    try
    {
        MyClassDomainContext objcontext = new MyClassDomainContext();
        objcontext.MyFunction(1, "ADD", 1234, "Vehicle");
    }
    catch (Exception ex)
    {
        LogMessage("Error : StackTrace : " + ex.StackTrace);
    }
}

After installing and Start window service i get below error in ex.stackTrace in log filem as below

Error : StackTrace :    at MS.Internal.JoltHelper.get_Context()
   at MS.Internal.XcpImports.Application_GetCurrent(IntPtr& pApp)
   at System.Windows.Application.get_Current()
   at System.ServiceModel.DomainServices.Client.WebDomainClient`1.ComposeAbsoluteServiceUri()
   at System.ServiceModel.DomainServices.Client.WebDomainClient`1..ctor(Uri serviceUri)
   at RIAService.Web.Service.QLink.MyClassDomainContext..ctor()
   at MywindowService.MyService1.timerQ_Elapsed(Object sender, ElapsedEventArgs e)

so my main confusion is, can i do like this? if yes then where i go wrong?

please help me.

waiting for reply.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:21:30+00:00Added an answer on June 1, 2026 at 2:21 am

    i get solution in other way,

    in my project.Web (ASP.NET project) i create a simple WCF application that call my function of WCF RIA Service.

    And in window service solution I add service reference of that WCF service and calling that WCF function and complete my task.

    @duluca thanks fro the reply.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which has some post build events that do some copying
I'm working with an external framework (redmine) which has one Project model that has_many
I have an object Project which has a number of fields, one of which
I have a project which has gui consisting of three buttons.Now one of these
I have a solution in VS 2008 which has one web project and 3
I have one of a aspx page in my asp.net project which has a
I have a Django project which has two apps (one created as debug test).
I have one project that is using ESAPI4PHP which is a port of OWASP's
I have a django project which has two apps, one is AppA and AppB
I have a solution in Visual Studio 2008 which has multiple projects. One of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.