|
It gives Problem regarding Permission when I execute the query the permission Exception is raising and saying that u don't have right to read MSys table .
Thanks FCriend
|
|
|
|
|
There is no "MSys" table, but many tables that start with "MSys", which is why I said "MSys*", like a wildcard match. Make sure you specify a proper table and that the credentials (username and password) you log in with have administrative privileges (like the "Admin" user).
Also, don't say things like "the permission Exception". If you need help, be specific and say SecurityException or InvalidOperationException or something like that, along with the exact exception message. There's many things that can go wrong in an application, even in specific blocks of code.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I write a winApp to send EMAIL. Since the server needs to authenticate, so
I need to use TcpClient rather than SMTPMail class. But the problem comes.
Following the DATA tag, I send strings like these:
"Subject:IP Notice"+CRLF;
"This is your IP."+CRLF+"."+CRLF;
But when I receive the mail, only subject was appear and there was no mail body. If I do it in this way, sending the follow strings:
"Subject:IP Notice"+CRLF;
CRLF;
"This is your IP."+CRLF+"."+CRLF;
Then the body exists.
Please do me a favor. I don't know why. Thanks a lot
|
|
|
|
|
This is what the SMTP protocol requires, as well as the HTTP protocol for that matter. You must have to carriage-return, line-feeds after the headers.
See RFC 821[^] (SMTP) for details.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Olap and XML/a .I want to the relationship between
This is Jitendra
|
|
|
|
|
Try the SQL and/or XML forums. This forum is for C#, a programming language for the .NET Framework.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have asked something similar before but was distracted by another part of the app I am implementing and am only getting back to implement this part.
The problem is I have a client/server app. On the client I have a form which acts as a 'splash screen'. Using a combination of a few different methods I have 'locked-down' the client so that it is not possible to use the pc. What I need to do, using remoting, is to allow the server app to hide the splash screen form at the click of a button, therefore allowing users of the pc to use my client app. What I am attempting to implement is a internet cafe management system. All clients are locked until released by the server app by the splashscreen.
I am on a pretty tight time schedule so if anyone could help me with a bit of sample code to allow me to show/hide a remote form, or a nod in the right direction I would be really really grateful,
Thanks in advance,
John
|
|
|
|
|
One easy way would be to declare an interface with the Show and Hide methods:
public interface IVisibleProvider
{
void Show();
void Hide();
} Put this in an assembly shared by the client and server code. The client control can easily implement this - the Show and Hide methods already exist so just implement the interface without having to define the methods and you're done. The server can make calls on the client using this interface using the appropriate activation types (like a singleton or client-activated type) that allow the server to make calls back to the client (so use a TcpChannel as well since HTTP is a client-request, server-respond protocol by nature).
Another way is just to have the client handle the clicks or key presses and call a method on the server - passing some sort of client ID - and the server returns a value that signals if the client can be unlocked or not. If it can, unlock it, otherwise ignore the click or yell at the user. This would be much easier to implement and would allow you not only the ability to use either the TCP or HTTP channels, but also just to use a simple XML web service, much easier to implement and easier to make secure through the Web Service Enhancements (WSE) 1.0 SDK from Microsoft (includes WS-Security, WS-Identity, WS-Routing, and more and easily integrates with Web Service code) if you desired extra security (so users don't intercept messages and change them before they reach their destination).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I implemented the idea using an interface. However I am getting the following error when I leave the system idle for a few minutes and then try to show/hide the form across the network:
"no receiver registered"
From what I have been reading there is a timeout on the leave given to the object. Its getting a bit above my head at the moment. Is there any easy way to set the timeout to never? Have looked at the microsoft site and did a search but its very technical. Any pointers anyone?
Thanks,
John
|
|
|
|
|
This has to do with lifetime management, not connection timeouts. Since all remotable objects must derive from MarshalByRefObject , you can override InitializeLifetimeService and return null , which means the remote object stays active forever.
You should pick up a good book on Remoting, like "Microsoft .NET Remoting" from http://www.microsoft.com/mspress[^] or "Advanced .NET Remoting" from http://www.ingorammer.com[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello,
I'm trying to globalize my application built with Forms in C#.
The language is to be chosen by user thanks to a ComboBox.
When a language is selected interactively, I set CurrentUICulture, but the problem is that I can't manage to change automatically the Form's language (title, text labels, etc)... unless I close the window and instanciate a new one.
I've tried using Refresh and Update but it has no effect :
private void Combo_SelectedIndexChanged(object sender, System.EventArgs e)
{
Thread.CurrentThread.CurrentUICulture = new CultureInfo(_Lang[Combo.SelectedIndex]);
Refresh();
}
Any idea ?
Regards,
- Éric -
|
|
|
|
|
Refresh and Update have to do with painting, not reassigning values. To do that, you basically have to do everything you would typically find in InitializeComponent except instantiation, i.e. reassign all your resources (strings, sizes, points, etc.) to their controls. If you localize everything that's localizable (which the designer does, which is extremely inefficient) you should do so in between calling the container control's SuspendLayout and ResumeLayout methods for faster layout.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Its there a component or class that can be mapped or assigned to a database table and when the table change (insertion, delete or update) fire an event or send a notifycation to tell the aplication about the change
thanks....
|
|
|
|
|
There is SQL Server Notification Services which is a separate installation apart from SQL Server. IIRC, you can use Web Services or MSMQ. It can send notifications based on SQL events or scheduled events.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question:
When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed.
Favourite quote:
In youth we learn, In age we understand.
|
|
|
|
|
Maybe you can use UDDI? We use it to find a webservice..
|
|
|
|
|
It's recommended you do not share the actual remotable library. Use interfaces instead, and share only the interface. For example
public class MyRemotableDll : MarshalByRefObject, IMyRemotable
{
void SomeMethod()
{
}
}
MyRemotableDll obj = new MyRemotableDll();
RemotingServices.Marshal(obj, "obj.rem");
public interface IMyRemotable
{
void SomeMethod;
}
IMyRemotable theRemoteObj = (IMyRemotable)RemotingServices.Connect(typeof(IMyRemotable), "http://localhost:4030/obj.rem");
theRemoteObj.SomeMethod();
Hope that helps.
---------------------------
He who knows that enough is enough will always have enough.
-Lao Tsu
|
|
|
|
|
Judah,
Thanks for the nice solution. I have further question in your solution and it may sound stupid but help me.
When I am using interfaces on client side how the call reaches to particular piece on server where this interface is implemented. I mean to say that this interface may have been implemented in different different areas. I know that to reach particular piece we do registration of server and give right address (tcp/http) on client side but my question is interface is just an abstract thing. How the call from client actually reaches to server. Please help..
Favourite quote:
In youth we learn, In age we understand.
|
|
|
|
|
In addition to what Judah said (which is the preferred way when you have control over development like this), you can also use soapsuds.exe from the SDK to generate a client proxy (for cases when you can't dictate how the remote object is developed or deployed).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
What library do you use to zip up files? I am using java.util.zip and it's giving me some problems.
Everything works fine if WInZip is installed. However if you uninstall WinZip and it uses the Windows default compresser things don't work so well:
the zip file is created but it's empty.
Does anyone know a solution to this problem?
Thanks,
Elena
Here is my code:
<br />
ZipOutputStream m_zipstream; <br />
string filepath = @"C:\Elena\Junk\test\a.txt";<br />
m_zipstream = new ZipOutputStream( new java.io.FileOutputStream( @"C:\Elena\Junk\test\zip.zip" ) ); <br />
ZipEntry currententry = new ZipEntry(filepath);<br />
currententry.setMethod(ZipEntry.DEFLATED);<br />
<br />
m_zipstream.putNextEntry(currententry);<br />
<br />
try<br />
{ <br />
java.io.FileInputStream current = new java.io.FileInputStream(filepath); <br />
try<br />
{<br />
sbyte[] buffer = new sbyte[8192];<br />
int buffercount;<br />
while ((buffercount = current.read(buffer, 0, buffer.Length)) > 0)<br />
m_zipstream.write(buffer, 0, buffercount);<br />
}<br />
finally { current.close(); }<br />
}<br />
finally { m_zipstream.closeEntry(); }<br />
m_zipstream.close(); <br />
m_zipstream = null;<br />
Elena
|
|
|
|
|
Free one here[^]
---------------------------
He who knows that enough is enough will always have enough.
-Lao Tsu
|
|
|
|
|
What is the common practise of updating build and revision number if I want to increase it sequentially (i.e. not using the automatic VS.NET way) for every build? If I increase build number on every build, what about revision number? Does build number and/or revision number ever get reset to 0?
|
|
|
|
|
This project here on CP does that automatically (add-in for VS.NET I believe)
|
|
|
|
|
Hello everybody!
I've written a JavaCoder. With this program I can create,edit,... my java source files. I have even been able to highlight the syntax ( like in Visual Studio. NET ).
Now I've got a question:
How can I make a code-completion?
I use a richt-text-box to edit my files.
Can anyone help????
Thanks
petermax2
|
|
|
|
|
petermax2 wrote:
I use a richt-text-box to edit my files.
Not the best choice of editors. You spend more time overriding functionality than just doing a code editor from scratch. There are also many examples out there (see http://www.gotdotnet.com/workspaces[^]) that could give you some hints.
How do you get command-completion to work? For languages that support it, you use reflection (which Java supports). When you hit the member separator (typically "."), you reflect (and cache, if you haven't already - which is a good idea) the members. I assume you're doing this in C# since you're in the C# forum, so you'll need to use a native JNI DLL and encapsulate that in a managed class. Click "My Articles" in my sig and see my Java/.NET article for a discussion on that. See the JNI docs on Sun's http://java.sun.com[^] site for more information about using Java classes from C/C++.
Microsoft MVP, Visual C#
My Articles
|
|
|
|