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 936075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:15:22+00:00 2026-05-15T21:15:22+00:00

I have the business logic of an workflow-like application in a C# class library,

  • 0

I have the business logic of an workflow-like application in a C# class library, but at end of each month certain process in the library needs to be invoked, i thought that the ideal mechanism to invoke this scheduled execution is using the Sql server agent (sql job preferably, althought i’m open to even go into SSIS hell if its absolutely required), but the question is how do i invoke the process of the application library from the sql job?

the application library is also used from asp.net pages, so it usually has a web application context (web.config) with configured input and output databases

I understand that the steps are more or less

1) embed the class library in a sql server CLR assembly, strong key sign and deploy it
2) call the library

the thing i am not clear is, when deploying such a CLR assembly, what happens with the web application context? how do i exactly go to deploy the CLR with the appropiate app.config? do i have to redeploy the CLR if i need to change the connection strings?

I am unsure also because the CLR needs to connect back to the database which is invoking it (for read and write table purposes) but i’m guessing one has to be extra cautious to avoid self-invoking and that sort of thing.

  • 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-05-15T21:15:22+00:00Added an answer on May 15, 2026 at 9:15 pm

    First, this post ends up in “use SSIS” 😛

    As long as your library contains links to System.Web.dll I don’t think that you will be able to register it in SQL Server as SQLCLR assembly. SQLCLR assembles are very restricted and cannot contain any reference.

    You could move front-end specific parts of your business logic into a separate presentation layer library. This is generally a better solution than mixing business logic and presentation classes like a web application context. After that you can try to deploy your assembly to SQL Server.

    Now you are able to create a second SQLCLR library, containing the .NET stored procedures that orchestrate your business objects.

    However, I don’t really see the advantage of SQLCLR, here. It would require huge changes in your source code and causes several restrictions for your whole application.

    My personal preferences would be
    Either use a SSIS package. Here you can refer any other DLL and consume its functionality.
    Or write a simple .NET console application which will be started by SQL Agent.
    In both cases, the implementation is almost equal.

    SQLCLR is especially designed to handle purely database specific tasks that hit the wall of possible (and suggestive) T-SQL features.

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

Sidebar

Related Questions

Okay, I have a business logic class like this: Note: For context, Vendor Briefs
I have a library that I created with some business logic that includes writing
I have an application with three layers (Presentation, Business Logic, and Data Access). In
I have a business logic like below and I would like to know which
Say you have an application divided into 3-tiers: GUI, business logic, and data access.
I have my business-logic implemented in simple static classes with static methods. Each of
Let's say you have a business logic method that can perform some operation across
In an N-Tier app you're supposed to have a business logic layer and a
I am creating a series of UserControls that all have some similar business logic.
We have DB that has massive amount of business logic stored in triggers inside

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.