|
Well, the only way that you can really do this is to rewrite the ico file on a byte level.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
When I deploy my web application in a Windows 2003 server(SP2) it is giving the array "index was outside the bound of the array".If you have any suggestions to resolve this issue please let me know.
Regards,
Prajin
|
|
|
|
|
Any idea on what we should base our suggestions ?
|
|
|
|
|
Prajin wrote: If you have any suggestions to resolve this issue please let me know.
Well the index your trying to access ... in the array ... is out of the bounds :P i.e. if you have 28 items your trying to access either <= -1 or >= 28.
The trick is to read the exception text, suprisingly it tells you whats wrong.
I'd hate to see what you'd do if you got a Win32 error
|
|
|
|
|
I wonder how do you know all this ?
|
|
|
|
|
It's a gift he's got.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
It's my amazing psychic powers ... didn't ya know? :P I can take mere text and extract meaning out of it!
I'm going to start a tour of lectures soon called how to read AND understand ... I'll make millions.
|
|
|
|
|
Deploy your Application or Component Using Windows Installer,i have read this article and anderstand somthing,this article is very good . but i also have one question,how to ask user for product code and how to validate.is there any way to do this....?.If product is correct then only user should be able to install the product.like what we have seen in microsoft products which will ask for product code while installlation.the same way i want to implement in my setups.the customer Information dialog's serialnumbertimplate is too simple to protect ,just base on modulo by 7 algorithm.
could anyone pls help help out if u know.ur suggestions are greatly appreciated.
from vevi
|
|
|
|
|
this is dhanaraj.. i am new to asp dotnet,,,
i want to bind the datagrid dinamically.. help me any one
|
|
|
|
|
Hello everyone,
I am working on an application that uses .NET Remoting to communicate between a Windows Service and a client program. I am trying to use Activator.GetObject from the service to access data in the remoting server. Unfortunately, the service reaches the code where I request the data from the remoting server and never gets past it. The code after that line is never executed and an exception is never caught. I can't figure out what I'm doing wrong.
The code is below. Any help or suggestions would be greatly appreciated.
Jason Lewis
<br />
Remoting Object<br />
---------------<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Contexts;<br />
<br />
namespace MCCSharedLib<br />
{<br />
[Serializable()]<br />
public class OutData<br />
{<br />
<br />
[Serializable()]<br />
public struct OutItems<br />
{<br />
public int iNumUnits;<br />
public int iAType;<br />
public int iBType;<br />
... <br />
public bool bAAdvanced;<br />
public bool bBAdvanced;<br />
};<br />
<br />
public OutItems m_OutItems;<br />
<br />
public OutItems OutputItems<br />
{<br />
get { return m_OutItems; }<br />
set { m_OutItems = value; }<br />
}<br />
<br />
public OutData()<br />
{<br />
m_OutItems = new OutItems();<br />
m_OutItems.iNumUnits = 1;<br />
m_OutItems.iAType = 2;<br />
m_OutItems.iBType = 2;<br />
...<br />
m_OutItems.bAAdvanced = false;<br />
m_OutItems.bBAdvanced = false;<br />
}<br />
<br />
}<br />
}<br />
<br />
ILoadMenu Interface<br />
-------------------<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
<br />
using MCCSharedLib;<br />
<br />
namespace MCCRemoteClient<br />
{<br />
public interface IGetData<br />
{<br />
<br />
InData GetData();<br />
<br />
}<br />
<br />
public interface ISetData<br />
{<br />
<br />
void SetData(MCCSharedLib.OutData.OutItems _OutData);<br />
<br />
}<br />
}<br />
<br />
Server<br />
------<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Tcp;<br />
using System.Text;<br />
<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Threading;<br />
using System.Diagnostics;<br />
using System.Runtime.InteropServices;<br />
using Microsoft.Win32;<br />
<br />
using MCCRemoteClient;<br />
using MCCSharedLib;<br />
<br />
<br />
namespace MCCRemoteServer<br />
{<br />
public class MenuManager : MarshalByRefObject, IGetData, ISetData<br />
{<br />
private System.Threading.Timer m_HIDTimer;<br />
private MCCSharedLib.OutData m_OutItems;<br />
<br />
public MenuManager()<br />
{<br />
m_OutItems = new OutData();<br />
<br />
TimerCallback timerDelegate = new TimerCallback(UpdateData);<br />
m_HIDTimer = new Timer(timerDelegate, null, 1000, 1000);<br />
}<br />
<br />
public override Object InitializeLifetimeService()<br />
{<br />
return null;<br />
}<br />
<br />
private void UpdateData(object state)<br />
{<br />
... (works fine)<br />
}<br />
<br />
<br />
public MCCSharedLib.InData GetData()<br />
{<br />
return m_DataItems;<br />
}<br />
<br />
public void SetData(MCCSharedLib.OutData.OutItems _OutData)<br />
{<br />
m_OutItems.OutputItems = _OutData;<br />
<br />
}<br />
<br />
<br />
public MCCSharedLib.OutData.OutItems GetOutData()<br />
{<br />
OutData.OutItems TempData = new OutData.OutItems();<br />
<br />
TempData = m_OutItems.m_OutItems;<br />
<br />
return TempData;<br />
}<br />
}<br />
}<br />
<br />
Windows Service<br />
---------------<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Diagnostics;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Tcp;<br />
using System.ServiceProcess;<br />
using System.Text;<br />
using System.Threading;<br />
using System.Runtime.InteropServices;<br />
<br />
using MCCRemoteServer;<br />
using MCCRemoteClient;<br />
using MCCSharedLib;<br />
<br />
namespace MCCRemoteService<br />
{<br />
public partial class MCCRemoteService : ServiceBase<br />
{<br />
private MCCSharedLib.OutData.OutItems m_OutItems;<br />
private System.Threading.Timer m_HIDTimer;<br />
<br />
<br />
public MCCRemoteService()<br />
{<br />
m_OutItems = new OutData.OutItems();<br />
<br />
InitializeComponent();<br />
<br />
TimerCallback timerDelegate = new TimerCallback(UpdateData);<br />
m_HIDTimer = new Timer(timerDelegate, null, 1000, 1000);<br />
}<br />
<br />
private void UpdateData(object state)<br />
{<br />
MCCSharedLib.OutData.OutItems OutItems;<br />
<br />
MenuManager RemoteObj = (MenuManager)Activator.GetObject(typeof(MenuManager), "http://localhost:9250/RemoteObject");<br />
<br />
try<br />
{<br />
OutItems = RemoteObj.GetOutData(); ******************** Line in question *******************<br />
<br />
... (more code, never reached)<br />
}<br />
catch (Exception ex)<br />
{<br />
}<br />
}<br />
<br />
protected override void OnStart(string[] args)<br />
{<br />
TcpServerChannel channel;<br />
<br />
channel = new TcpServerChannel(9250);<br />
<br />
ChannelServices.RegisterChannel(channel, true);<br />
<br />
RemotingConfiguration.RegisterWellKnownServiceType<br />
(typeof(MenuManager), "MenuManager", <br />
WellKnownObjectMode.Singleton);<br />
}<br />
}<br />
}<br />
|
|
|
|
|
The scenario:
1. Windows service, running on 2 machines; each marshals a singleton remoting object.
2. Events are passed thru an intermediary per recommendations in articles on Remoting Events.
3. Client, running on one of the 2 machines, connects to both services via remoting (TCP) and receives events from both.
4. Then... the LAN is physically disconnected from the client machine.
5. Loss of connection to the "other" machine is correctly noted and handled. Reconnection of the LAN cable results in correct recovery of that remoting connection. No problem there.
6. Problem: The next event delivery from the "local" service fails with "The connection was forcibly closed..." (Why, pray tell?) and the event delegate is appropriately removed (it's an expected result when the client "leaves"). The remoting proxy to the local service remains intact, so the client never knows that its event subscription has been lost and it never gets restored.
7. Oddity: If the LAN cable is unplugged before the client attempts the remoting connections, the resulting subscription to the local server events is unaffected by subsequent LAN connections and disconnections! Obviously, something about the remoting path is different.
Q1: Can I force the insulated connection that occurs in (7) to happen even when the LAN is present?
Q2: Failing Q1, can I detect or prevent the loss of the event connection that occurs in (6)?
(C# explanations preferred)
|
|
|
|
|
|
how can i run an application if a search file condition return true
|
|
|
|
|
Hello,
I don't know about setup projects in Visual Studio, but I did some installers with Inno Setup tool. This tool is free and powerful. You can use Object Pascal and do all what do you want using this tool.
|
|
|
|
|
|
i want to add some files and folder (html and mdb) to my project publish
(c#.net 2005)
|
|
|
|
|
Have you tried right clicking on your web site then clicking on add folder. Then add all your files to the folder. Then right click on the folder and select add existing, then select the files you just added to the folder.
Just make sure you let Visual studio 2005 create the folder.
Hope that helps.
Ben
|
|
|
|
|
thank you, it works
|
|
|
|
|
I want to change the expand/collapse button to an arrow. Is there any simple way of doing this?
-- modified at 9:41 Wednesday 1st August, 2007
|
|
|
|
|
Hai All,
Is there any way to lock(Disable) my Mouse operations using API
Thanks and Regards,
Sharmie
|
|
|
|
|
Why do you want to do that? Doesn't sound very nice. How are you going to regain mouse operations later on?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I want to display questions on a page and onmouseover to any question, answers are shown of that question. I want that the divs expand and answer div is shown after a question.
How can i do this?
Can I develop an expandable gridview control?
If yes please let me know or give me any idea how to do that.
Thanks
|
|
|
|
|
Hi
I have had to move my work accross to a different machine as my laptop has decided to stop working!
I have pulled the project accross and i have the same setup as before with mysql 5 and connector.net 1.0.9
But i just can't get .net to connect to mysql using this setup for some annoying reason as there is no difference between the setup of the two machines
Does anyone have any suggestions my connection string takes the followin form
connectionString = "Server=localhost; Database=ftp1; User ID=;Password=;Pooling=false;Connection Timeout=10;Protocol=socket;Port=3306;"
|
|
|
|
|
Can't you rename the one project to make MSBuild happy?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: Can't you rename the one project to make MSBuild happy?
Why should i do it without any valid reason, and moreover in my solution there are many projects about 10 to 15 contain dot"." in their names.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|