Jump to content
Xtreme .Net Talk

goodmorningsky

Avatar/Signature
  • Posts

    175
  • Joined

  • Last visited

About goodmorningsky

  • Birthday 06/20/1974

Personal Information

  • Occupation
    Sr. Developer
  • Visual Studio .NET Version
    2000
  • .NET Preferred Language
    C#

goodmorningsky's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello all. I have a window application ready to publish as commercial product. I want to make evaluation version download and license key input when user purchase. I haven't done license key programming for window yet. So, Could you guys tell me how to start with it? Any comment helps. Thank you!:)
  2. Hello all. I creates an ASP.NET application using Crystal report with VS2008. I creates Web setup project. MS says I don't need to add any merge module for crystal report on VS2008. But, HOW CAN I Add License key? Do I need License key to deploy on web server? Without license key How many cucurrent users are allowed? (Since it says more than max user requrest will be queued -> I couldn't find what's max?) any comment or link to related documents will helps. Thank you all.
  3. Solution I resolved the issue. I changed ClassInterfaceType to AutoDispatch and it solves it like following. [ClassInterface(ClassInterfaceType.AutoDispatch)] The problem started from .NET1.1. Since ClassInterfaceType.None shouldn't work in .NET1.1 even. However, somehow they changed something or fixed bug in .NET2.0 and it stop work with None for Late binding client. That's why it confued me. Anyhow, thank you all.
  4. Hi all, Since our project have to support legacy VB6 client also, I created COM+ using .NET. First time I create COM+ using .NET 1.1 version. VB6 client calls the COM+ Application class and calls Exectue4VB() method. There was no problem. I test it all and worked as expected. We decided to convert COM+ code using .NET 2.0. However when I converted the code to .NET2.0, it stops work!! So, I created small test COM+ and test vb6 client. It doesn't work. It works perfectly ok with COM+ written in .NET1.1. Error is : Object doesn't support this property or method It's so wired. What is problem? .NET2.0 doesn't support it anymore or what? It's same code. I've searched all around to find related doc. I couldn't find any. Any comment helps. Thank you all. Here is sample code: using System; using System.Collections.Generic; using System.Text; using System.EnterpriseServices; using System.Runtime.InteropServices; namespace DLSBPM2.Engine { [Description("COM+ class.")] [ClassInterface(ClassInterfaceType.None)] [ObjectPooling(Enabled=true, MinPoolSize=4, MaxPoolSize=4)] [Guid("F72E9E0F-CDFF-49A4-858F-889F868DB7F5")] public class Application : System.EnterpriseServices.ServicedComponent { public Application() { } public object Execute4VB(object objs) { return "" + objs + ":" + DateTime.Now.ToLongTimeString(); } } } // I added to COM+ like following regasm DLSBPM2.Engine.dll /tlb DLSBPM2.Engine.tlb gacutil /i DLSBPM2.Engine.dll regsvcs /tlb:DLSBPM2.Engine.tlb DLSBPM2.Engine.dll //And VB6 client Code sample Option Explicit Private Sub Command1_Click() Dim myApplication As Object Set myApplication = CreateObject("DLSBPM2.Engine.Application", "myserver") Dim result ' following line of code throw Error with .NET2.0 COM+ ' : Object doesn't support this property or method result = myApplication.Execute4VB("this is test") MsgBox result End Sub
  5. Hi, all. I have problem with COM+. I created COM+ with C#.NET. I have to call this COM+ from window application(in C#.net) remotely using late or early binding. I called COM+ with late binding, it throws 'Method not found' exception. And I don't know how to do early binding. I didn't have problem to calling COM+ written in VB. I add reference from COM tab. It works ok. However, when I try to add reference of COM+ written in C# from COM tab, it throws error message, "A reference to 'COMPlusServer2003' could not be added. Converting the type library to a .NET assembly failed. Type library COMPlusServer2003 was exported from a CLR assembly and can not be re-imported as a CLR assembly." I tried to add reference from just .NET tab or browsing the dll. It works with locally, but doesn't work with remotely. I've searched any source code or help over web. I've found only about how to make COM+. I couldn't find how to create client calling the .net COM+ remotely. Here is the code, using System; using System.EnterpriseServices; namespace COMPlusServer2003 { [Transaction(TransactionOption.Required)] [ObjectPooling(Enabled=true, MinPoolSize=4, MaxPoolSize=4)] public class Bank : System.EnterpriseServices.ServicedComponent { public Bank() { } [AutoComplete] public int Add(int i1, int i2) { return i1 + i2; } } } AssemblyInfo is [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("..\\..\\COMPlusServer2003.snk")] [assembly: AssemblyKeyName("")] [assembly: ApplicationName("COMPlusServer2003.COMPlusServer2003")] [assembly: ApplicationActivation(ActivationOption.Server)] [assembly: ApplicationAccessControl(false, Authentication=AuthenticationOption.None)] And client app is: //Testing Late binding private void button3_Click(object sender, EventArgs e) { System.Type type = System.Type.GetTypeFromProgID("COMPlusServer2003.Bank", "remoteComputer01", true); object app = System.Activator.CreateInstance(type); object[] args = {1, 2}; object result = type.InvokeMember("Add", System.Reflection.BindingFlags.InvokeMethod, null, app, args); //Method 'System.__ComObject.Add' not found. Exception is thrown MessageBox.Show(result.ToString()); } //Testing Early Binding //On local, my development computer where server COMPlusServer2003.Bank is. It works ok. private void button4_Click(object sender, EventArgs e) { System.Type type = System.Type.GetTypeFromProgID("COMPlusServer2003.Bank", "w2kpro3", true); COMPlusServer2003.Bank app = (COMPlusServer2003.Bank)System.Activator.CreateInstance(type); int result = app.Add(1, 2); MessageBox.Show(result.ToString()); } Early Binding code throws error when the application calls from other machine remotely. I did installed the proxy(created by Exporting it from the server COM+) on the other machine before launching the client. I have no idea! It should work. Please help. I couldn't find any help from any article including msdn.. Any comment will help!
  6. Hi, all. If you ever used visio, you have seen the arrow link. You can put arrow link between two text boxes or image boxes. I want to create the arrow as a custom control so user can select arrow on the form and can drag it/link between two picture boxes. Does any one knows about this? Any info will help! Thank you.
  7. Hi, all. I'm looking for a softwear engineering tool helping us with: Project list management To do list management with priority, current working person, checkin / check out, Bug tracking, database, releted to todolist, Test matrix, test cases.. etc. It would be general tool for? team based softwear development. Could you guys suggest any tools for this purpose
  8. Hello, I created custom MenuItem class named SkyMenuItem : MenuItem. I want MainMenu to use my custom SkyMenuItem class when I design mainmenus. I think I have to customize MainMenu class too. But, I don't know how to do it to force it to use Custom MainMenu in design time! Any idea or reply will help!! Thank you all.
  9. ExecuteDataSet or any other Execute.. doesn't set Autoincrement property! adapter.ExecuteDataSet(datasetobject); datasetobject.Table[0]["ID"].Autoincrement return always false! How can I retrieve DataTable object with Autoincrement Value set?
  10. Hi all, I want to put Back button that redirect to previous page that should not be the same page caused by postback event. How can I ignore postback event? I thought about Page.Request.UrlReferrer. But, it gives the postback page. What is common and standard approach?
  11. I want to use premitive types too. I want to define it once and reuse it since I have to use it alot. And I feel it's possible, but don't know... :p
  12. Hi, all. I have string array. I want to convert a specific type. I need following like method. /// Convert string array to specified type array public static object ConvertArrayType(string[] inputArr, System.Type itemType){} I want to do like this. return (itemType[]) inputArr; //I know this is wrong. However this give you idea what I try to do. :p Is there a method/Reflection alreay doing this or it's not possible? Thank you all..
  13. I have to parse javascript codes that are read from .js file. Does anyone know javascript parser that I can use with api it provides? I wrote regularexpressions to parse it. But, it's better to go with existing javascript parser rather than coding myself and debugging hard myself.. :p Thank you..
  14. Sure you need this. You shouldn't miss Regulator, free tool. It provides regular expression search from web, parsing, coding supports, etc. It's best tool you need start with. Get from. http://regex.osherove.com/ and read this link article introducting 10 tools you need with .NET. http://msdn.microsoft.com/msdnmag/issues/04/07/MustHaveTools/default.aspx It makes your life easier as it did to me.
  15. Hi, all I bind DataTable to DataGrid from Page_Load event. DataView dvw = ds.Tables[0].DefaultView; this.dgColorDate.DataSource = dvw; this.dgColorDate.DataBind(); And I want to hide certain column and add some control to cell. When I try to do it from PreRender event handler. this.dgColorDate.Columns[(int)Lst.MDL_MFG_COLOR_ID].Visible = false; this.dgColorDate.Columns[(int)Lst.Colors].HeaderText = "Colors"; It throws error. When I check it in debug mode, dgColorDate.Column.Count returns 0. How can I solve this?
×
×
  • Create New...