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

  • Home
  • SEARCH
  • 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 306783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:29:56+00:00 2026-05-12T07:29:56+00:00

I am trying to take the code in an .ASMX web service and change

  • 0

I am trying to take the code in an .ASMX web service and change it into a class library project. The web service project has a web.config file with:

<applicationSettings>
    <myService.Properties.Settings>
        <setting name="DownloadChunkSize" serializeAs="String">
            <value>100000</value>
        </setting>

..and the code in the FileService.asmx.cs file uses this to retrieve the value:

int chunkSize = (int)Properties.Settings.Default.DownloadChunkSize;

When I try to re-architect this code to eliminate the .asmx web service, I get a compile time error in my class library project because there is no longer a web.config available. Let me try to explain a bit more about what I’ve done so far (and why):

The motivation for this is to simplify my projects. That is, I have a Vstudio solution with an .asmx project that works. It has a few methods and encapsulates the communication with another .asmx web service supplied by a vendor.

The new design I am attempting is as follows:

Project 1 is a class library project called ProxyASMX with a web reference to the vendor web service. I’ve provided no code here; it simply has a small app.config pointing at the vendor web service.

Project 2 is a class library project with a reference to the ProxyASMX.dll. The code in this FileService.cs file is the same as my original web service but the [webmethod] attributes have been removed. This is the project I’m having trouble compiling.

Project 3 is a web application project with 2 HTTPHandlers – Upload.ashx and Download.ashx. This project will have a reference to the Project 2 class library. I tried replacing the small default web.config content with the more comprehensive web.config content from the original solution but when that did not work I thought I better consult the experts about this venture.

I hope the above sketch is clear. I THINK this should be very do-able but now I am not so sure.

  • 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-12T07:29:56+00:00Added an answer on May 12, 2026 at 7:29 am

    You can add Application Settings to a class library. So you add the Application Settings on the project that “consumes them”. Then you simply copy these config sections “up the project stack”.

    So if I understand you correct, you need to add the DownloadChunkSize setting to Project 2 and copy this section to your web.config in Project 3. This will be something like:

    <applicationSettings>
        <Project2.Properties.Settings>
            <setting name="DownloadChunkSize" serializeAs="String">
                <value>100000</value>
            </setting>
    

    You can access this setting inside Project 3 using:

    Project2.Properties.Settings.Default.DownloadChunckSize
    

    And in Project 2:

    Properties.Settings.Default.DownloadChunckSize
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 268k
  • Answers 268k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer IIS will by default display the page default.aspx. You can… May 13, 2026 at 12:59 pm
  • Editorial Team
    Editorial Team added an answer My preferred method for doing this is to find n… May 13, 2026 at 12:59 pm
  • Editorial Team
    Editorial Team added an answer Very close: $(".statuslight[title='" + currentStatus + "']"); Supposing your currentStatus… May 13, 2026 at 12:59 pm

Related Questions

I have the code below in an attempt to allow the user to Step
I understand how outer() works in R: > outer(c(1,2,4),c(8,16,32), *) [,1] [,2] [,3] [1,]
I am trying to read in a scanned image and compress it from a
I know that this is probably something easy to implement, but I am having

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.