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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:39:28+00:00 2026-05-26T22:39:28+00:00

I have created a simple WCF service that is to be configured by an

  • 0

I have created a simple WCF service that is to be configured by an MVC3 UI.

When I call the index page from my controller, I want to display the values held in the configuration, which has been returned by the service. The user could then chose to edit these settings and then send them back to the service.

I want to do something like this in the index view …

<div>
    @Html.ActionLink("Edit", "Edit", model)
</div>

and then consume the model in the controller like this…

[HttpPost]
    public ActionResult Edit( SettingsModel Config)
    {
        try
        {
            List<string> configErrors = null;

            if (ModelState.IsValid)
            {
                // Set up a channel factory to use the webHTTPBinding
                using (WebChannelFactory<IChangeService> serviceChannel = new WebChannelFactory<IChangeService>(new Uri(baseServiceUrl)))
                {
                    IChangeService channel = serviceChannel.CreateChannel();
                    configErrors = channel.SetSysConfig(Config);
                }
          }
            return RedirectToAction("Index");
        }
        catch
        {
            return View();
        }
    }

but this doesn’t work.

Any suggestions???

  • 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-26T22:39:28+00:00Added an answer on May 26, 2026 at 10:39 pm

    When the form gets posted, all the input type fields data is collected and sent to the server. You can see this data using FireBug. The key point here is that, is the data that is being posted in a form, that MVC’s default model binder can understand and map it to the model object, which is being passed as input parameter to the action method.

    In your case, the model is of type “SettingsModel”. You have to ensure that, the form data that is being posted is in format, that can be mapped to the “SettingsModel” object.

    Same kind of question discussed in another thread : Can't figure out why model is null on postback?

    Check Out this article : NerdDinner Step 6: ViewData and ViewModel

    In the above article, carefully go through the “Using a ViewModel Pattern” section. My guess is that, this is what you are looking for.

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

Sidebar

Related Questions

I have created an Ajax enabled WCF web service that contains this simple method:
I have created a simple Silverlight Plugin that makes a call to a WCF
I have created a WCF web service, i am calling it from ASP.NET 1.1
I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string
I have created a very simple WCF service, hosted on windows service, closely following
I have a very simple WCF service that I would like to expose publicly.
I have created a simple WCF service by following a MSDN tutorial. I successfully
i am new to wcf. i have created and hosted simple wcf service on
I have created a simple WCF (.NET 3.5) service which defines 10 contracts which
I have created a simple Northwind's Product REST Web Service in WCF at /Northwind/Product

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.