C# - Web Service Session Works While Debugging But Not When Its Published?

Dec 3, 2010

I'm finishing up my first web service. It stores data on a dataset that I later need to check up on, so I need to keep that information around. I've already enabled the session in the web service's method "EnableSession = true" [WebMethod(Description = "Receives status requests, as well as status udpates.", EnableSession = true)]

If I debug the web service everything works but if I try to use the application that sends the requests to the web service while it is published, the session keeps restarting again and again and again.

View 1 Replies


Similar Messages:

C# - Application Runs When Debugging But Not When Published

May 10, 2010

When publishing my web application and then running it will return the error

"Could not load file or assembly 'BaseApplicationName' or one of its dependencies. An attempt was made to load a program with an incorrect format."

However if I run the application through debugging (f5) it runs correctly.

I guess what it comes down to is

what differences are there when running an application through debugging vs publishing it that would cause a problem like this?

When publising I have it set to delete all existing.

History of how it started... I added the 32 bit Oracle.DataAccess dll to my 64 bit system. It would not work and crash giving the same error as above but with the Oracle.DataAccess name instead of the baseApplicationName. I have since removed all references to it and removed the dll to try and get it to run without it once again.

View 3 Replies

Web Forms :: Code Behind Works In VS2010 But Not When Published In IIS?

Oct 24, 2012

Imports System.Collections.ObjectModel Imports System.Management.Automation
Imports System.Management.Automation.Runspaces Imports System.Text
Imports System.IO
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If DropDownList1.Text = "ABCD" Then
Label1.Text = " ServerB" End If

[code]....

I have an ASP.NET site I built for our users to map a network printer. When I test it, it maps the printer without any probelms. When I publish it to IIS, it acts like it's going to run, but never tries to map it. I have checked all the permissions, I have tried it as a web app and a web site, I have tried to publish both and I have tried to copy and paste the folders in the root folder. I have added references to the Microsoft.Powershell.XXXX. I have changed it from "CodeBehind" to "CodeFile" and I have changed the "AutoEventWireup" to "true". There are no errors in the event log and none on screen. It clears the fields, like it should at the end of the code and that's it.

View 1 Replies

Configuration :: Network Drive Mapping Works In IDE, But Not On Published Site?

Apr 27, 2010

I am able to save documents to a network drive from my c# asp.net application when it is run from my developmet machine, but not when the application is deployed to a website. Below I list the code that makes the call to map the drive the class is a standard class for this purpose. Can anyone help me figure out what is wrong?CODE:

The code that instantiates the mapping class
NetworkDrive drive = new NetworkDrive();
drive.ShareName = @"\38.186.8.244Docs";

[code]....

View 8 Replies

Configuration :: Local Works Fine But Published Website Fails With Error?

Dec 7, 2010

I have a solution that has 2 projects in it... Project #1 is a class I created some time back to deal with the basic data connection and passing data back and forth.

The 2nd project is the new current project (web site).

Everything works fine in local mode but after I have compiled Project #1 and created a referance in Project #2 then compiled Project #2 and published to the server...

I am running on Windows 7 64bit, .NET 4.0, Access 2010, SQLExpress (loging only), C#... I have rebuilt Project #1 several times as an x86, AnyCPU, and x64... they all give the same result...

I get the following error when the web site is run.

[Code]....

View 4 Replies

Need Debugging Hints: Visibility Change On Postback Works On One Page But Not Another?

Sep 26, 2010

I have a webform containing a user control. On that user control is a set of radio buttons. When the radio button is changed, a panel and a text box is shown or hidden depending on which radio button was selected.I can give you an example that works correctly:testcontrol.aspx:

<asp:RadioButtonList ID="ChoicesRadioButtonList" AutoPostBack="true" OnSelectedIndexChanged="ChoicesRadioButtonList_SelectedIndexChanged" runat="server">
<asp:ListItem Text="Show 1"></asp:ListItem>

[code]...

View 3 Replies

ADO.NET :: The Model Folder Is Not Being Published To Hosted Service?

Feb 19, 2011

I am working with this tutorial .[URL] In Visual Studio under the WCF REST program called .. TeamTask.Service is see the folding folders and files

[folder] Properties
[folder] References
[folder] AppData
[folder] Model
[file] Global.asax
[file] TeamService.cs
[file] Web.config

Then I use Build...Publish TeamTask.Service to move this up to my shared hosted server....it builds and publishes successfully

When I reset the client to my virtual directory on my domain...it opens and I get an error that I believe is because it can't find and records or tasks

When i look in the folder that was published to I find this:

[folder] AppData
[folder] bin this has a TeamTask.Service.ddl and TeamTask.Service.pdb
[file] Global.asax
[file] web.config

No folder for Model.

View 3 Replies

WCF / ASMX :: WCF - Invalid Argument Error From Published WCF Service

Dec 20, 2010

I am making a call to a WCF service(Existing) from another WCF Service(New, my service), which is configured as Anonymous access. I did a service reference of my service to web application both under same solution file and web app is configured as Windows Authentication. When I call the existing WCF Service from my web app directly, everything works fine, but when I call the same existing WCF Service from my service, I got a "user does not have valid credentials" error. To avoid this error, I published my service to a server and referenced that URL to my web app. Though I got past the error, now, I am getting "Invalid Argument" error. No further information on the error.

Error source is MSCORLIB. There is no problem in the code of my service and the existing service, because if the same value that I get from the existing service is hard coded, then everything works fine. The existing service is used by many other app and it works fine. So, its a tested service. I tried to find a solution of "invalid argument" and I found few threads where others are facing the same problem when they publish a WCF service, but I did not find any proper solution for this.

View 1 Replies

WCF / ASMX :: Accessing A Published Web Service Gives Null Ref Exception?

Sep 2, 2010

I have an Asp.net web service that I created using Visual Studio 2005. I can acess the web service in my test environment, call methods and return data as expected. If this web service is published to the outside world (Outside of the company firewall), it will return a null why this might be happening? The same code is being used,against the same database. The only difference is that the published website is giving back the null reference exception. If I type in the URL for the web service "https://secure.theSiteGeist.com/wsIndigo.asmx" a list of methods for the web service is displayed in my browser. Yet if I try and call any methods on the web service I get back the null reference exception. Note that the URL I posted above is not the real name of my web service, but is just used for reference sake.

View 3 Replies

Watch The Content Of Session While Debugging?

Feb 22, 2011

I added a watch expression for HttpContext.Current.Session

I can see the Count being equal to 2 but I can't find the actual content. Where do I find the content of the session while debugging?

View 2 Replies

AJAX :: 401 Error When Calling Web Service Internally While Debugging?

Jun 21, 2010

If I call my web service directly it works, however, when I try to call it from another controller on the same project I get a 401 exception. Below is the code I use to call the WS, and it is being run in VS not IIS.

[Code]....

View 1 Replies

Visual Studio :: Losing Session When Debugging After Redirect?

Mar 14, 2011

OS: Windows 7

VS: VS 2010 Pro SP1 - IIS Express

I am debugging my project, the first page is a login page which I login and I can see from debug that the session is being set, after the redirect to the homepage the session seems to be lost and I am taken back to the login page.

If I run outside of VS on our sandbox or production server the login works fine. It only seems to be my machine w/ VS that does not like the sessions.

View 2 Replies

Configuration :: Web Service Works Locally But Not When Deployed?

May 28, 2010

When I deploy my web service, I get the following error:

There is no build provider registered for the extension '.svc'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

I found one thread ([URL] that a solution but, I can not get it to work. If I make the changes to my web config file as in the thread, I then get a configuration error. One odd thing is that, if I check the machine.config file on my machine, located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGmachine.config, I don't see any of the config settings described in the thread. As a matter of fact, there is no mention of "compilation" or "buildProviders" at all.

Here is my entire config file listing:

[Code]....

View 2 Replies

State Management :: Disappearing Session State On Published Website?

Mar 9, 2011

I'm having problems with the sessions states on my application.When I run the application off my c drive all the session variables are there. Everything works perfectly, nothing is wrong.However, when I publish the site to a server test environment, the session variables disappear. Why is this? Is there a way around this?Here is my codes.for retrieving it. Note, the session.count actually is 0.

[Code]....

for setting the session variables.

[Code]....

View 5 Replies

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

AJAX :: AutoCompleteExtender Works As Web Service Not Firing Within Page

Sep 5, 2010

I have created an autoextender & cannot seem to get it to work within my pages. So I'm missing something probably small yet important.

The webservice AutoComplete.asmx, when called by itself, does return data correctly.

The codebehind for AutoComplete.asmx is located in the App_Code folder.

AutoComplete.asmx and the page from which I am calling it are both located in the root folder.

AutoComplete.vb:

[Code]....

View 2 Replies

Calling Vb6 Objects From .net Web Service Fails But Works From Forms App?

Jan 20, 2010

We have an asp.net web service running on Windows Small Business Server 2008 SP2 (64-bit). It is in its own application pool. We've tried both Integrated and Classic settings for Managed Pipeline Mode. Enable 32-bit Applications is set to True. It is not able to successfully call a vb6 dll method but a Windows Forms app on the same machine can.Two vb6 dlls (A and B) are instantiated. The method in A is passed a reference to B as one of its parameters. That method then calls other methods within itself that also require the reference to B.Those internal method calls in A fail with this vb6 error (the A method logs these errors in the Windows Application event log):

70 (Permission Denied)

Another error is also logged in the Windows System event log:

The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {xxx} to the user NT AUTHORITYNETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.The object in question (a third vb6 component which is an ActiveX EXE) has already been configured using DCOMCNFG (Component Services) with full Launch, Activation, and Access Permissions given to NETWORK SERVICE and even Everyone. Additionally, from Explorer, full control/permissions have been give to all required vb6 components to NETWORK SERVICE (tried Everyone too).

A Windows Forms application on the same machine is able to successfully call the method in A. The same web service works on another machine with a 32-bit OS.Both the web service and the Forms app have been built with Platform Target set to "x86".How can we get the web service call to work on the 64-bit machine?

View 1 Replies

Session Variable Getting Lost Using Firefox - Works In IE?

Apr 29, 2010

I am setting a Session variable in an HttpHandler, and then getting its value in the Page_load event of an ASPX page. I'm setting it using

public void ProcessRequest(HttpContext context)
{
HttpPostedFile file = context.Request.Files["Filedata"];
context.Session["WorkingImage"] = file.FileName;
}

(And before someone suggests that I check the validity of file.FileName, this same problem occurs if I hard-code a test string in there.) It's working just fine in IE, but in Firefox the Session Variable is not found, getting the "Object reference not set to an instance of an object" error in the following code:

protected void Page_Load(object sender, EventArgs e)
{
string loc = Session["WorkingImage"].ToString();
}

Has anyone encountered this problem - and hopefully come up with a means for passing the session variable?

View 1 Replies

ASMX Service Works On Development Server Returns 404 When Deployed To IIS 7.5?

Mar 24, 2011

I have a web application in ASP.NET 4.0. I've added an asmx service, primarily as a source for the autocomplete extender's lookup values.

When I debug on my machine locally, everything works fine. However, when I deploy the web application to IIS 7.5, I get a HTTP 404 response when trying to send data to the service.

I am able to browse to the service definition, see the available operations. Tellingly, however, when I use the test pages to test the service using POST, I receive an HTTP 404 again.

I'm not sure what is going on. I did create the asmx file within my web application and it is deployed in the virtual directory of my otherwise working production application. Is there an issue with the .asmx file being deployed in the same virtual directory, perhaps?

View 1 Replies

C# - Storing Classes In Session Variables - How It Works (memory)

Mar 31, 2011

I've read that you can store classes directly into a session variable i.e.

Session["var"] = myclass;

My question is how the memory management works. Does it automatically serialize this into the session on the client side?

Or does it hold the data for the instance of the class in server memory, and just holds a reference in the session object?

View 4 Replies

Web Service Returning Xml Data Using Jquery Works Fine On Local But Not On Server?

Jan 4, 2010

I am having a webmethod that returns some data.I'm using jquery to call that function with its Content type specified as XML.The problem is that it is working on local machine but not on server.The code i'm using is:

var arrInputs = pnl.getElementsByTagName("input");
str = arrInputs[0].value;
$.ajax({[code]....

Ajaxfinish is defined afterwards and it works fine on local.Is there some more settings i need to do to make it executable

View 1 Replies

State Management :: Session Timeout Works Only In Test Server?

Jun 6, 2010

I have an scenario where, in the test server the timeout works fine, as defined in the web.config (60 minutes) but it ends prematurely (3 minutes or so) in the MSSQL server. Both are using tables from the MSSQL, the only difference resides in the App_Data folder, which is not in the MSSQL server, as the roles and membership are managed by the LocalSqlServer.

View 2 Replies

Configuration :: Session Value Becomes Null On Deploying - Works Fine With Development?

Aug 16, 2010

My Session gets null after redirecting to other page,

Below written is my code in login page:

protected
void btnLogin_Click(object
sender, ImageClickEventArgs e)
{
// saving login history calling submit function to save login details in database
callsubmitfunctionofDatalayer();
//saving session
Session["Username"] = txtUsername.Text;

[Code]....

View 3 Replies

Visual Studio :: Unable To Start Debugging On The Web Server / Debugging Failed Because Integrated Windows

Jun 3, 2010

I get this error when I hit F5 in VS 2008. I have checked that Windows authentication is enabled on the site and it is. I can mannully attach the debugger to the IIS process and it works. What could be wrong? I have tried alot of things without success.

View 2 Replies

Visual Studio :: How To Turn Off Remote Debugging 2010 / Unable To Start Debugging On Web Server

Mar 7, 2011

I'm trying to debug my web application on my localhost machine in Visual Studio 2010 and I keep getting this error: "unable to start debugging on web server. The Microsoft Visual Studio remote debugging monitor(MSVSMON.exe) does not appear to be running on the remote computer."

Is there a way I can turn this off as I'm not trying to make any attempts debugging remotely.

View 1 Replies







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