.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

how to call methods in jar files in asp.net?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application
 

In my project i have a requirement to use a jar file in an ASP.net website. The jar file contains few methods with input and return parameters.

Is there any way to call the methods inside the jar file from .net without converting it to dll? Is there any easy way to create a connecter or wrapper between java and dot net?

Thanx in advance,

Arun




View Complete Post


More Related Resource Links

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

HOW to call FTP Server and get files using DotNet.

  
I  find some information about to connect and get files using below code. http://www.codeguru.com/csharp/csharp/cs_internet/desktopapplications/article.php/c13163 But i would need to call cd(/) directory using SSIS. can anyone help how to resolve this issue.N.Srikanth Reddy

How to restrict to call Web Methods

  
 Scenario is, I have a tab container inside which I placed 5 tabs and each tab having 4 Cascaded dropDown. Now for changing the tab page everytime refreshed and calling all 5 parent control dropwdown to fill. But can I prevent it in that manner so that for changing the tab only that parent webmethods will be called to populate. In page load itself it will call only the active tab parent Cascading dropdown web method.

Can not call two different pagemethods with two service methods??

  

I am using an AJAX dropdownlist control with two dropdownlist.  Instead of using a webservice to populate the data, I used the pagemethod to populate.  My problem is the second droplist won't populate.  I get a server error, 500 in the droplist.  The first droplist populates fine.

BUT here's the real kicker.  If I reverse the order of the public static function such that GetHelloList2 comes BEFORE GetHelloList1 in the code, then the GetHelloList2 works ...... it just seems like it is only firing one pagemethod event and allowign only one.


Here's my code:

ASPX

<asp:DropDownList ID="DropDownList1"
  runat="server" Width="285px" />
<br />Second droplist<asp:DropDownList ID="DropDownList2"
  runat="server" Width="285px" />
<br />


<cc1:CascadingDropDown ID="CascadingDropDown1"
  runat="server" Category="Hello3"
  TargetControlID="DropDownList1" ServiceMethod="GetHelloListPageMethod"
  LoadingText="Please wait" PromptText="Select a model">
</cc1:CascadingDropDown>

             <c

Call DLL Methods from outside the project / Load Dynamic WPF in aspx

  

Dear All Experts,

for my project, i created a solution with a one aspx page and all of other components are Dynamic load WebUserControls ascx, each user control and related functions are a separate webapplication project.

now i need to use WPF with my project, i dont know how to load the ".xbap" file Dynamically in my page,

also when i tried to use it as iframe, i face the error "System.Security.SecurityException: That assembly does not allow partially trusted callers" which means that i cannot call or use any of my DLL's methods from outside the project invironment (please note that i am not using strong names anywhere), i put [assembly: AllowPartiallyTrustedCallers]  attribute in AssemblyInfo.cs but also i cannot call required functions.

now the questions is:

1. can i associate with WPF (*.xdap) files and load it the same as dynamics user controls?

2. how to call and let my functions work outside the project invironment.

thanks.


Call DLL Methods from outside the project / Load Dynamic WPF in aspx

  

Dear All Experts,

for my project, i created a solution with a one aspx page and all of other components are Dynamic load WebUserControls ascx, each user control and related functions are a separate webapplication project.

now i need to use WPF with my project, i dont know how to load the ".xbap" file Dynamically in my page,

also when i tried to use it as iframe, i face the error "System.Security.SecurityException: That assembly does not allow partially trusted callers" which means that i cannot call or use any of my DLL's methods from outside the project invironment (please note that i am not using strong names anywhere), i put [assembly: AllowPartiallyTrustedCallers]  attribute in AssemblyInfo.cs but also i cannot call required functions.

now the questions is:

1. can i associate with WPF (*.xdap) files and load it the same as dynamics user controls?

2. how to call and let my functions work outside the project invironment.

thanks.


How to call page methods from a Master page ?

  

Hi,

I have written web methods in code behind and I'm able to call them using PageMethods.(method name) in an ordinary aspx page.

If I'm trying to call the webmethods in a master page using PageMethods.(method name), it is throwing a jscript error pagemethods

is undefined.

My code is like this:

 

   [System.Web.Services.WebMethod] 
   
    public static string[] GetTimes()
    {
        dt1 = DateTime.Now;
        string[] a = { };
        a[0] = dt1.ToUniversalTime().Subtract(new TimeSpan(5, 0, 0)).ToString("HH:mm");
        a[1] = dt1.ToUniversalTime().ToString("HH:mm");
        a[2] = dt1.ToUniversalTime().AddHours(0d).ToString("HH:mm");
        a[3] = dt1.ToUniversalTime().AddHours(8d).ToString("HH:mm");
        return a;
    }


<script language="javascript">

  function UpdateNYCTime() {


      PageMethods.GetTimes(times, OnSucceeded);

 }
 
 function OnSucceeded(result, userContext, methodName) {
   $get('spanNYC').innerHTML = result[0].toString(); 
 }
 




</script>


 

 

Any Suggestions ? If I cannot call page methods from master page page, is there any another way of calling them ?

Thanks,

Sailaja

 

Error: Cannot call methods on int (Microsoft SQL server, error: 258

  

I have written this SQL query in query designer in Report Builder

When I run it I appear to be getting the following message:

Cannot call methods on int (Microsoft SQL server, error: 258). Does anyone know why I am getting this. In theory this query should work.

SELECT

AccountsContacts.ContactID AS [AccountsContacts ContactID]

,AccountsContacts.Name

,AccountsContacts.Telephone

,AccountsContacts.Mobile

,AccountsContacts.Fax

,AccountsContacts.Email

,AccountsContacts.JobTitle

,AccountsContacts.Department

,AccountsContacts.AdditionalInfo

,Enquiries.ContactID AS [Enquiries ContactID]

,Enquiries.EnquiryID

FROM

AccountsContacts

inner JOIN Enquiries ON Enquiries.ContactID = AccountsContacts.ContactID

WHERE

Enquiries.EnquiryID = @Enquiries.EnquiryID


Directory.GetFiles with searchPattern to get all *.dll and *.exe files in one call

  

Hi experts,

is it possible to use Directory.GetFiles with searchPattern to get all *.dll and *.exe files in one call?

 

Thanks

Avi


How to call the executebale (.EXE) files within a web service?

  

Hi All,

I have a web application. This application collects some information from the user and the details needs to be passed to a .EXE. It processes the parameters and gives the output as a text file.

The .EXE is hosted in another server (Application Server). I need to call the .EXE with the a set of parameters from the Web Server. Is there any way to call this .EXE through an web service? If yes how to call the .EXE with parameters within the web service?

Is there any other way to handle this kind of scenario?

 

Thank you.


Kathir

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

  
.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET AJAX
.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

The Decorator Pattern & Extension Methods

  
The decorator pattern provides a formal way to add new functionality to an existing type, without sub-classing. First question: What is wrong with classical inheritance? In and of itself, nothing is wrong with the good old Is-A relationship. It is very common to derive a new class from an existing base class in order to override a few virtual members, and add a pinch of new functionality.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

The Decorator Pattern & Extension Methods

  
Numerous design patterns exist in the software world today, and ultimately nothing is preventing you from making your own (if people buy into it or not is another question). Furthermore, there is no 'master list' of patterns that all developers agree upon. While this is true, if you pick up any book on the subject, you will find a set of very common patterns most programmers agree are very useful. Many of these patterns were first formalized in the seminal book on the subject, Design Patterns: Elements of Reusable Object-Oriented Software (aka, the Gang of Four [GOF] book; not to be confused with the UK punk band of the same name).

How to call an .exe file in .net

  
Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend