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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:47:53+00:00 2026-06-06T11:47:53+00:00

I have a WPF application with a Linq to SQL model. In the .dbml

  • 0

I have a WPF application with a Linq to SQL model. In the .dbml file, I have a stored procedure that returns the coordinates of an address. The procedure use the active internet conection to call a google maps “service” and get the coordinates.

The problem is, when the internet conection is slow, or is busy, the procedure takes long time to return the coordinates and I get a TimeOut exception in C#.

I was wondering if is there a way to control If the procedure takes more than x seconds to return, then skip it and continues with the process because the coordinates is not a mandatory information.

Thanks!

  • 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-06T11:47:55+00:00Added an answer on June 6, 2026 at 11:47 am

    The only way you could do this is to run the SP asynchronously and with a timer, cancel the async process when X seconds have passed.

    To accomplish this you could take the easy way and use a Task.

    Next, you can create a CancellationToken and pass it to the task’s start method. When the timer times out (your timer, not the SP), just cancel the task. For a quick way on how to do this I’m going to ask you to read the answer on this question.

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

Sidebar

Related Questions

I have a wpf application (C#) that needs to copy a file to a
In my WPF 4 desktop-based application, I have an LINQ query that makes a
In a WPF application I use LINQ to SQL queries inside try - catch
I have a WPF C# Application which is accessing data through a SQL-LINQ connection
I'm creating an application using WPF, MVVM and LINQ to SQL. I have a
I have WPF C# application that communicate with a PLC (i.e. write/read Omron PLC's
I have a WPF application (.NET 3.0, VS2008) that displays data in a tab
We have a WPF Application that runs from both desktop and as a XBAP
I have a WPF application that is a fullscreen kiosk app. It's actually a
I have a WPF application that's crashing once I get it onto machines that

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.