Web Forms :: Same Codes From Windows Application But Can't Compile The Same Way In Web Application

Jan 25, 2011

why is it that the exact same codes that i use to create a Windows application, which is able to work, does not work on a Web application? i created a windows application using c# and socket programming language. i will be connected to a remote server and through the windows application, and i will be able to send the "byte[] msg" to the server and activate the LED lightbulbs attached to the remote server. that exact same codes works well on the Windows application. however, when i create another Web application using the same exact codes, i does not have any error yet i am not able to activate the LED lightbulbs attached to it. is it that through the web or internet explorer i am not able to send the "byte[] msg" correctly? or that i sld modify "byte[] msg" to suit the web usage? or any other reasons?

View 7 Replies


Similar Messages:

Configuration :: Compile .Net Application From Another Application?

May 25, 2010

How to compile .net application from another .net application programeticaly using C#.

View 1 Replies

MailMessage Sent To Any Adress From Windows Forms Application, But Not From Asp.net Application, After Both Are Using The Same SMTP-server?

Jan 27, 2010

I'm experiencing a to me mysterious error when sending e-mails through a SMTP-server from an ASP.NET web application. I get the famous error "unable to relay for xxx@yyy.zzz". What's mysterious to me is that when I cut and paste the exact same code that sends the e-mail into an usual .NET Windows Forms application, send the e-mail with this application, it all works just fine. This made me think that perhaps the problem is that the ASP.NET application runs as NETWORK SERVICE while the Windows Forms application runs on a domain user account, but it turns out that I have another ASP.NET application sending e-mail through the same SMTP-server running under NETWORK SERVER at the same IIS, and this application does not experience this problem.

I've further tried to send e-mails through the SMTP-server manually by telnet the smtp-server on port 25 and running the SMTP-protocol manually, and it all works fine. The SMTP-server is not configured with any kind of authentication or SSL.

Another mysterious fact is that the ASP.NET application can send e-mails from an adress within the same domain to an e-mail adress within the same domain, but not to any adress outside of the domain. But the Windows Forms application, that uses the exact same code, can send e-mails from any adress to any adress both within AND outside of the domain.

So to summarize:

The ASP.NET application can send
e-mails from addresses within the
domain to adresses within the domain,
but not to addresses outside of the
domain.
A Windows Forms application running
the same code on the same computer
can send e-mails from ANY address to
ANY address.
Another ASP.NET application on the
same IIS running under the same
account (NETWORK SERVICE) can send
e-mails using the same SMTP-server
from ANY adress to ANY adress.
There is no authentication configured
on the SMTP-Server.
Both the ASP.NET application and the
Windows Forms application utilizes
the System.Net.Mail.SmtpClient class
to send a
System.Net.Mail.MailMessage.

The code that sends the e-mail massage is:

private void button1_Click(object sender, EventArgs e)
{
MailMessage mesasge = new MailMessage(txtFrom.Text, txtTo.Text, "Test mail", txtBody.Text);
SmtpClient client = new SmtpClient();
if (!(string.IsNullOrEmpty(txtUserName.Text))) //Is false since txtUserName.Text is empty
client.Credentials = new System.Net.NetworkCredential(txtUserName.Text, txtPassword.Text);
client.EnableSsl = false;
client.Host = txtServer.Text;
client.Port = 25;
try
{
client.Send(mesasge);
}
catch (Exception ex)
{
txtResponse.Text = ex.Message;
}
}

As far as I can understand, this should be a matter of configuration rather than coding issues.

View 2 Replies

Get Application File Path In Windows Forms Application?

Nov 3, 2010

I have a simple windows form app that I need to get the file path for. I am placing a config file in the same directory and I need to be able to get the path to that file.

I have used
Application.CommonAppDataPath
but that returns the path with 1.0.0.0 at the end.

and
Applicaiton.StartupPath
but that returns the path with indebug at the end

Is there anyway to get the path to just the main file directory without anything appended to the end?

View 3 Replies

Web Forms :: Integrate Windows Application Into Web Application?

May 19, 2012

is it possible to call or integrate the windows application into asp.net web application? is it yes then tell me how to do it.

View 1 Replies

Web Forms :: Port Application To Asp 4 And Can't Compile - Class Not Available

Sep 21, 2010

In an old ASP.NET 2.0 Web Site application I have reference to a class named ProfileCommon which gives me access to profile properties from the Web.Config. Now I'm trying to port this application to ASP.NET 4.0 and cannot compile because this class is not available in the 4.0 version.... What is the best way to get around this problem?

View 1 Replies

Web Forms :: How To Compile Application Using Command Line Prompt

Nov 12, 2013

how can i compile command line through web application? my application is built on asp.net(C#)....

View 1 Replies

Can Windows Service Application Share A Bin Folder With A Web Application

Jan 5, 2011

I have some common dlls that are referenced by both a windows service application and a asp.net web application. I don't want to make separate copies of the dlls and I also don't want to put those dlls into GAC. I try to put that service application under the same root folder as the web application so that they can share the same bin folder. I am not quite sure if this will cause any problems? I did find the web application had random session timeout, but not very often. Not sure if it was caused by the shared dlls.

View 1 Replies

Configuration :: How To Compile Application In 64 Bit

Sep 2, 2010

I have my asp.net 2.0C# with crystal report whcih is developed in windows xp(x86) machine...

now what my problem is in my local server it work fine

Whn comes deployment in hosting server, my service provider has w2k8 server x64 bit..

how to compile my asp.net crystal report application to run in 64 bit..

how to compile this to 64bit.

View 4 Replies

Compile A Web Application Into A Ddl File?

Jan 23, 2011

how to compile a web application into a ddl file.

View 7 Replies

Passing Data From Windows Application To Web Application?

Apr 26, 2010

I have a windows application and a web application. The windows as well as web application has a login page. The username and password are same for the windows and web application.

In the windows application, the user enters the username and password. With this username and password in windows application, is it possible to log into the web application? If yes, How to pass the data from windows application to web application, thereby logging into the web application. Is it possible to pass the username and password from a windows application to a web application?

View 5 Replies

Converting Windows Form Application In Web Application?

Dec 27, 2010

Is it possible to convert a windows form application into a web application?

If it is not possible, how can I add the OpenFileDialog in a web application form?

I cannot see it in the toolbox if i choose new web application. On the other hand, I can see it if I choose windows form application.

View 21 Replies

WCF / ASMX :: Passing Value From Web Application To Windows Application?

Aug 17, 2010

I have a web page where I used a gridview and a button.When selecting rows in the grid and click on the button another windows application fires.I need to pass the values of the selected rows to the windows application.

Rightnow I'm saving the values in an xml file and fetch the values in the windows application.But this is not practical when creating xml files with random numbers(Scan125.xml,Scan7867.xml,etc).

View 1 Replies

Local Web Application Or Windows Application For System?

Jun 17, 2010

I am going to design system that will keep track of publications due by researchers in my work place
Need for this project :

1- a database housing the information .

2- Automatic reports must be generated .

the users will upload PDF and we have around 25 researchers.

I can't decide which one is better for my system .

My questions are :

1- Local web application or windows application ?

2- Access or SQL as database ?

3- I have visual studio 2010 for student use, Could I use it or I need to buy one ?

View 1 Replies

Web Application References For A C# Windows Application Developer?

Oct 14, 2010

I am used to working on C# .NET windows applications. I am interested in starting with web applications. good ebooks or references for C# ASP.net to begin with for a guy like me who is comfortable with windows applications?

View 3 Replies

Compile Web Application Project Ascx Into Dll?

May 10, 2010

Is it possible to compile a web application project .ascx (user control) into a dll?I want to do the following:Use the same control in multiple websitesEmbed css and .js as resources into the controlBe able to update super easy. If the user control updates, I just want to update 1 .dllI have successfully followed this article, [URL]However, that uses web site projects, and I cannot embed js css as resources into web site projects.

View 3 Replies

Visual Studio :: How To Compile Web Application To A .exe Or .dll

Jul 13, 2010

I need to know how to compile my web application in vs2008 so that it can run on a server without the codebehind files being viewed or how i make it and .exe

View 12 Replies

C# - Compile Errors On Deployed Web Application, But Not In The IDE?

Dec 30, 2010

In my deployed web application I am getting the following error:

CS0103: The name 'releaseLionButton_Click' does
not exist in the current context

It identifies this as the offending line:

<asp:Button ID="releaseLionButton" runat="server"
Text="Release the Lion!"
OnClick="releaseLionButton_Click"></asp:Button>

[code]...

View 2 Replies

Configuration :: How To Compile Application As X86 To Run On 64bit Environment?

Jul 28, 2010

I have asp.net application which in develop on the 32bit environment it works fine when deployed on the server.But the problem is when we are deploying the application on the 64bit environment it is giving two problem.1) Exception: System.InvalidOperationException: The 'MSDAORA.1' provider is not registered on the local machine."2) Exception: System.Exception: Cannot create ActiveX component.After doing some search people saying that recompiler your appliation as x86 to work on 64bit environment.How can i do that? when can I find the option for that in VS 2005.or

View 1 Replies

Configuration :: First Time Deploying A .Net Application, Get Compile Errors?

Mar 11, 2011

I am using TFS to build my MVC app. I cannot do it because I get lots of compile errors. I am using version 4 of .Net and MVC 2. On the build server I have the .Net framework 4.0 installed. It has been suggested that I should also download the MVC framework as well, but when I look on the net all I can find is this MVC framework; http://mvcframework.codeplex.com/ which does not seem to be relevant and does not work anyway.

One of the assemblies I am missing on the build server is System.Web.Mvc dll.Typical error messages include; "The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)"What do I need to do to fix this?

View 2 Replies

Visual Studio :: How To Compile Application Targeting 32-bit Platform

Apr 21, 2010

I want my application to get compiled as a 32-bit application since the dll's that are added are 32-bit dll's.

View 1 Replies

Application To Windows Application Communication

Oct 11, 2010

What are the different ways in which a web application can communicate to a windows application? I have heard that activex control events can be handled in javascript to achieve this.

Does WCF or any new technology provide a better implementation for this?

Can the publish/subscribe architecture be used here?

View 2 Replies

Convert Windows Application To Web Application?

Jan 20, 2011

Is it possible to convert windows application to web application. if yes means how can do this.do u have any tools.if not means why.

View 1 Replies

Configuration :: Assembly Web.service2 Missing - Comes Back When Trying To Compile Application

Sep 24, 2010

I have a project that was originally created in VS2005 using .net 2.0. I currently have win 7 machine and vs2008. When I try to compile the application it comes back saying that I am missing an assembly Web.Services2 Besides upgrading to 3.5 and having to rebuild most of the web services.

View 1 Replies

Configuration :: Using VS2008 To build / Compile Web Application And Then Publish It To The Server?

Jul 27, 2010

I'm relatively new to actually publishing sites on my own..Anyway, right now I am using VS2008 to build / compile my web application and then publish it to the server. Simple enough, until I want to change several of the code behinds, and don't want to spend 30 minutes re-publishing several thousand documents.

I have been reading that publishing via VS is not the best approach, so I guess I have two questions:

1. Using VS2008, is there a way to build the project and publish only certain parts of the project such as the pre-compiled code or better yet have VS only update the code that has been changed on the server? I suppose I could simply publish it to my local drive and pick apart the files from there / is there a better way?

2. In your opinion what is the best deployment strategy?

View 4 Replies







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