WCF / ASMX :: Differentiate Between A Debugging Session On The Localhost And A Live Environment In Terms Of Calls To The WS

Nov 8, 2010

I am trying to differentiate between a debugging session on the localhost and a live environment in terms of calls to the WS.

View 5 Replies

Similar Messages:

State Management :: Differentiate Between New Session Create For New Website Visit Or Session Expired

Mar 2, 2011

I have a problem by getting session which created for new site visit or session expired.

View 3 Replies

Configuration :: Debug In Live Environment

May 26, 2010

i have a virtual directory in iis for my project. so that my application is accessible in other pcs as well. Now i want do debug the project when somebody is requesting the page from the other pc. i am not running application using (F5) Start Debugging. But still i want to debug when somebody is requesting the page. Netbean IDE has this feature.

View 1 Replies

Localization Works On Localhost But Not In Production Environment

Jan 20, 2011

I have this website with english and portuguese support. In localhost everything works fine and the content is translated based on the querystring parameter named "lang". This chunk of code makes the trick in every page:

protected override void InitializeCulture() {
SetCulture(); } private void SetCulture() {
var logger = Util.GetLogger();
string lang = Request.QueryString["lang"];
if (string.IsNullOrEmpty(lang)) { lang = "pt-br"; }
string sessionLang = (string)Session["lang"];
if (sessionLang != lang) { Session["lang"] = lang;
} logger.Log(string.Format("Culture {0} found",lang));
UICulture = lang; Culture = lang;
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);
logger.Log(string.Format("Cultura {0} set", lang));
base.InitializeCulture(); }

Thanks to the logger I can say for sure that this method is called in both cases (production and localhost). I have two resources files in App_GlobalResources folder:

View 1 Replies

Visual Studio :: Debugging And Localhost ASP.NET Applications?

Jan 14, 2011

I'd recently installed Windows 7 Ultimate 64 bit, and after I did this I cannot debug (or simply run without debugging) my ASP.NET applications (I use VS 2010). I'm getting message: Navigation cancelled.There seems to be a problem with the localhost. I'd checked the HOSTS file - it's configured correctly, I compared the settings with my other machine where I don't have this issue.

View 12 Replies

VS 2010 - Debugging Starts Slow On Localhost

Sep 21, 2012

All of a sudden my debugging is taking forever to start on localhost (several minutes). It also takes a long time to return to the vwd after I stop debugging.

I haven't done anything that I can think of that would change anything (it has worked in the past, although the slow stop may have been there for some time.

The only thing I did was to add another user to the membership db.

I think it's a problem with starting the localhost development server.

View 1 Replies

State Management :: Cached Dataset / Unable To Test In A Live Server Environment At Present

Nov 17, 2010

I'm currently developing a website using VS2010 Express/SQL Express 2008, and am using the applications development server to test.

I have created an access layer which effectively takes all my cachable data and creates datasets.

I've also created a system wheras for each dataset, For each dataset I also create a token cached object (a string), which is set to expire before the dataset. The theory behind this is that when my token expires and is removed from cache, it calls a routine to rebuild the dataset, and re-caches the new result, then creates a new token. Think of it as a poor mans SQL dependency.

What this allows me to do is rebuild datasets behind the scenes with little interruption/delay throughout the day. It all works great - for instance when a user updates a table containing 100,000+ records on the site, the dataset rebuilds at hourly intervals reworking and consolidating the data in the background before representing it in a smaller cachable form.

What I would like to know is this. If I was to replace the database during the usable day (only updating the tables that users don't update), lets say adding 50 new records, would it cause the cache to be dropped. The reason I ask is because it the cache remains until its exipry time, I can replace the database and rebuild datasets incorporating new data in the background when the token expires. If the cache is dropped when I update the database, it will mean interuption whilst I reload the datasets and will change my strategy on uploading new data.

I ask the question because I'm currently working on the development server and unable to test in a live server environment at present.

View 1 Replies

Configuration :: Deploying Onto Web Host Server - Debugging Live Site

Oct 4, 2010

Is there any way possible when my site is hosted to some how attach the process so I can debug the errors. Obviously as they are different environments what works in dev doesn't always work in.

View 3 Replies

Asynchronous C# Method Calls In Page Working On Debug, But Not Working On Live Site

Jan 25, 2011

OK Here is the situation:

I have a web app with a table of statistics on our salesmen's customers, and each row has a sparkline graph showing the general trend of the sales data for the last 12 months. Each page shows a particular salesman's customer list, and some of them can have an enormous number of customers = an enormous number of rows = an enormous number of sparklines (e.g. one in particular has 125 and takes 15 seconds to load).

For this reason, jQuery sparklines could not be used - they completely pinned the CPU of a user accessing a page with a lot of sparklines with IE.

So I moved on to using the Google Chart API, which worked much better, except for two issues: 1) it's on a secure site, and the Google Chart API URL is only served over HTTP (solved by using a small wrapper script to download the graph dynamically and re-serve it from our secure server); and 2) on a page with 125 sparklines, it was still very slow due to the number of requests (even when the 0-9 server prefixes are used to maximize the # of available connections).

So my next step beyond this was to try to make each of the "download/grab/re-serve image" method calls asynchronous - and it worked!

...but only on my dev box running in debug mode.

When I pushed it up to the live site, it was faster, but it left some of the images unloaded, which is of course unacceptable.

So here is what I was hoping some SO hotshot would know:

1) Why are my asynchronous method calls working while debugging, but not working on the live site?

2) Is there any easier way to get a large number of sparklines of some sort to load quickly on a secure server without making me want to tear my hair out?

2a.) Does anyone have any experience using the ASP.NET Chart Library? Is this something I should investigate?

2b.) A co-worker suggested I make my own sparkline routine using a 1x1 CSS background image and varying the height. The problems are a) it is completely un-extensible in case we want to make changes; b) it seems hacky as hell (leaves about a bajillion DIVs per sparkline in the markup); and c) I have no idea if it will be fast enough when there are 100-200 of them on one page - what are your thoughts on the feasibility of the 1x1 sprite approach?

View 2 Replies

Configuration :: Application Is Working Fine In Local Environment But Not Working After Push Code In Live

Aug 19, 2010

My application is working fine in local environment but not working after push code in live. My locale environment and hosting environment both are having same configuration. Same app working fine 2 month before but in different domain but same hosting server.

how to check the both config / any possible to run debug mode in hosting server please let me know. below code used in all page for checking user session status but when I click on any link page redirect to login.aspx I think session got timeout. I don't know why session got time frequently, but this issue not happening in local environment (desktop).


View 6 Replies

C# - How To Get A Reference To The Page Object In An Asmx It Calls

Feb 13, 2010

I have a page that calls on an asmx within the project (for some ajax stuff). Within that asmx I'm calculating a value and returning it to be output to the screen.

However I need to do a recalculation that includes summing this value with a few others. The function that performs the calculation is in a UserControl on the page.

How do I get a reference to the page object so I can use FindControl to get an instance of the user control so I can call that calcuation function?

View 2 Replies

WCF / ASMX :: Persistent HTTP - Connection For All Calls To A WS?

Apr 25, 2010

I need to connect to a WebService provided by someone else. This WS (all https) has three methods that are accessible without having logged on:

login, logoff, getVersion . All other methods require that the login-method has been called before. Nothing special unto this point. However, the docs state that I have to make sure that (quote):

"All method calls between login and logoff are to be carried out by means of the same persistent http-connection (key word: http persistent connections or http connection reuse"

I seem to be unable to figure out how that would work - all WS'es I ever utilized were either taking user/pwd combinations in each method call or the login-method returned something like a SessionID which was then used for each subsequent call to a given method (i.e. passed as a parameter). If I call the login-method and subsequently call any method that requires authentication, the call will fail with an exception telling me that I need to log in first.

View 1 Replies

WCF / ASMX :: Securing AJAX Calls From JQuery?

Sep 21, 2010

I am working on web application in which all of the data I am submitting back to the server is being done on the client side using JQuery AJAX calls to my .NET web services using JSON. This works perfectly to enhance my user experience and greatly reduces post backs, etc.What I am looking for suggestions on is securing the web services being exposed to the client side from being used by anything but my JQuery code on my site. The security hole that I see here is that since the client-side JQuery can access the web services, so could anything.

View 2 Replies

WCF / ASMX :: XE Currency Live Update?

Mar 25, 2010

consume the xe datafeed in asp.net using c#/VB

or any other reliable FREE currency service.

View 2 Replies

Using Both Post And GetAjax Calls For The Same WebMethod In ASMX Web Service

Jan 20, 2010

I can't seem to call a web service method from Ajax with both POST and GET.

Initially only the POST would work and GET would causes this error:

{"Message":"An attempt was made to call the method u0027getDatau0027 using a GET request, which is not allowed.","StackTrace":" at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}

I fixed that by adding this attribute: [ScriptMethod(UseHttpGet=true)] but now GET causes this error:


So is it true that you can only use either POST or GET and not both from Ajax?

View 3 Replies

WCF / ASMX :: (500) Internal Server Error / Posting XML From To Localhost?

Sep 15, 2010

I was given a new Win 7 machine for development and converted our project to it. Everything is working fine except posting a an XML from to localhost. I'm getting the famous (500) Internal Server Error. (previous machine was Vista...) I had also upgraded from VS2008 to VS2010.

There is nothing in the event log, and the IIS log shows that the web server does get the hit: 2010-09-15 15:03:13 W3SVC1 MYCOMPUTER ::1 POST /xml/MRPImport.asmx/UploadForecast - 81 - ::1 HTTP/1.1 - - - localhost:81 500 0 0 280

Below is the code that was working perfectly fine until the upgrade.

Dim oWeb As New System.Net.WebClient()
oWeb.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim bytArguments As Byte() = System.Text.Encoding.ASCII.GetBytes(strXMLData)
Dim bytRetData As Byte() = oWeb.UploadData(ToURL, "POST", bytArguments)

View 4 Replies

WCF / ASMX :: Debugging A Webservice

Jun 29, 2010

How to debug a web service localhost after hosting the webservice in IIS

i am not able to find a solution how to debug a web service locally . ie

i am not able to put a breakpoint in afterdeserialize and before serialize method

can any provide a sample code..

Any help

View 6 Replies

WCF / ASMX :: Want To Get Return Values From .net Webserive That Will Be Consumed By Multiple Environment

Feb 3, 2011

In have created a Web Service which needs to be consumed by multiple environment (.Net,Java,Python..etc) hence ,I have used List<list> as an outparameter (with "OUT" keyword )in my Web service to return value. My question is Will all the application consuming my webserice able to get List as return value ? if not can anyone help me out in getting return values from asp.net webserive that will be consumed by multiple environment


bool WS_GetUser(string Name,out List<ICWS.InstanceType> instype);

View 2 Replies

WCF / ASMX :: WCF Service Configuration In Web Farm And Load Balancing Environment

Oct 21, 2010

I want to configure ASP.NET Website Project using WCF Service[NetTcp] (both in c#) for web-farm (for website) and NLB Load balancing (for service). I would like to configure following options for same. NetTcpBinding.maxConcurrentCalls, NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections

Note: During single machine configuration when I changed value of NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections in WCF Service project to more that 10, which is default value. I got exception. When I changed this value in Website it was working fine. Due to this I had to keep in default configuration. Not sure why this is the case. If anyone could explain this it would be helpful. Following reference gives idea how to configure in given environment but does not tell how to go about it.

View 2 Replies

WCF / ASMX :: Windows Basic Authentication-Credentials Retained For Further Calls?

Aug 25, 2010

I have an XML web service where the authentication used is BASIC WINDOWS. Following is my client code to connect to the service.


Now, the issue is that the client is really authenticated only in the first attempt(First time I execute the code in VS). Further attempts succeed even if the code to assign credentials is commented or even after providing wrong user id/ password. I ensured that the server is hit each time(Just to make it clear that it not just because of client side caching).Is this the behavior of Basic authentication/credential cache. I would prefer the client be authenticated each time he hits the server.

View 2 Replies

WCF / ASMX :: Deploying Running Test Webservice On Localhost Development Computer?

Dec 30, 2010

I created a simple web service in VS2010 (C# - XP Professional SP3 development computer -- running .Net 3.5/4.0) that just does the basic "Hello World" and changes Temperatues from Farenhet to Celcius functions and ran fine in VS2010. I then created a directory in C:Inetpubwwwrootwebsvcvs10a (of the same development computer). In the localhost IIS I converted this to an application directory (properties/create application). I tried to deploy my web service here using the publish wizard of VS2010 but was getting errors stating that the URL was not in the correct format, so I decided to just copy myService1.asmx, Web.Config, and the bin folder (which contains the compiled assembly) directly to C:Inetpubwwwrootwebsvcvs10a. Then from the localhost IIS I tried to browse myService1.asmx and received the following error:

Configuration Error
Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error: [Code]....

Source File: c:inetpubwwwrootwebsvcvs10aweb.config Line: 6

Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

--I tried changing the targetFramework to 3.5 in web.config, but that did not fix the problem. I then removed the targetFramework attribute from web.config and then got this error message:

Could not load file or assembly 'myVS2010Websvc' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'myVS2010Websvc' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

What can I / should I do to resolve this problem so that I can deploy this web service project to localhost -- don't I already have .Net 4.0 runtime on this machine? It is the same machine that is running VS2010.

View 2 Replies

How To Keep Session Alive Between Two Calls To A Web Service In A C# Application

Oct 5, 2010

This is quite straight forward. I'm calling a web-service (.asmx, with session enabled) from a c# application. I want each call to be with the same session key as the previous one (as opposed to creating a new session key each time).

Here's my (nothing-out-of-the-ordinary) code:


View 3 Replies

How To Handle Session Timeout In Ajax Calls

Mar 8, 2011

I'm making an ajax call using jquery to an asp.net mvc controller action:

public ActionResult GetWeek(string startDay) {
var daysOfWeek = CompanyUtility.GetWeek(User.Company.Id, startDay);
return Json(daysOfWeek);

When session times out, this call will fail, as the User object is stored in session. I created a custom authorize attribute in order to check if session was lost and redirect to the login page.

View 2 Replies

How To Maintain Session Information Between Two Calls Programmatically

Mar 17, 2010

We have an external site which the users in our company connect to by giving their corresponding username and password. The external site is an ASP.NET website. We want to integrate this website into our intranet portal so that the users don't have to enter their UN/Pwd to login to the website. Since the target website has no provision for SSO, we are simulating the POST request to login.We are now required to perform an action after the initial login is done, on an another page. We can simulate the corresponding POST request as well

View 1 Replies

State Management :: Can Use Session Variables In A Hosted Environment

Feb 11, 2011

if using session variables to store and retrieve information is a bad practice? Let me give you some background:

I am developing a site for a friend of mine, and his site is hosted by Go-Daddy. My feeling is that Go-Daddy is not the best place to host a .NET site, but it is what it is.

After the first version of the site was published and people started using it, users immediately started having session time-out problems and null exceptions when referencing session variables. I researched everything I could and tried everything I could think to do, but I just could not correct the issue.

Then, while doing some testing, I discovered that users weren't individually timing-out and losing their session information, but, rather, all users where timing out at exactly the same time, regardless of how long they had been logged in or what they were doing. So, for whatever reason, the server was just dumping all sessions at random intervals.

At this point I needed to move on with the project so I added a number of cookies to replace the session variables, and everything began working properly.

in a hosted environment, should I avoid using session variables? Is it as problamatic as my research and experience would indicate, or is this simply due to the fact that I am working with a poor hosting company in Go-Daddy?

View 3 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved