|
what kind of attribute could it be?
please help on same.
Ravie Busie
Coding is my birth-right and bugs are part of feature my code has!
|
|
|
|
|
It looks like you're using a Dependency Injection framework such as Unity. Am I right? If so, the documentation should tell you.
Kevin
|
|
|
|
|
the defination for createnew is
public sealed class CreateNewAttribute : ParameterAttribute
{
public CreateNewAttribute();
public override IParameter CreateParameter(Type annotatedMemberType);
}
what does it mean? i m not getting
Ravie Busie
Coding is my birth-right and bugs are part of feature my code has!
|
|
|
|
|
Take some time to actually learn, don't just copy and paste.
only two letters away from being an asset
|
|
|
|
|
It's a custom attribute - you'll have to look for the class CreateClassAttribute in your source.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
I never considered that as I've never used (or needed to) an attribute on a parameter, I didn't even know you could! Something new learned today
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Me too
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
|
Unless I misunderstand the error is correct:
The Key <big>ConnectionString</big> does not exist in the app setting configuration section
as in
<add key="<big>Main.ConnectionString</big>" value="...
the key is "Main.ConnectionString"
Hope this give you the answer you need!
|
|
|
|
|
First of all thankz for your reply
Sorry keefb
it is my written mistake in question .......In project I am using same key .........now I corrected my question ...please check it again ......In app.config the key is ConnectionString .........and I also use ConnectionString (Same variable) in Code file ............Now please check it and can you tell me where is problem ....
why error occurs that I mentioned in first post
|
|
|
|
|
Can you post the code that gets the connection string?
|
|
|
|
|
Here is code
public clsGeneric()
{
_mainConnection = new SqlConnection();
AppSettingsReader _configReader = new AppSettingsReader();
_mainConnection.ConnectionString = _configReader.GetValue("ConnectionString ", typeof(string)).ToString();
}
When I run project from visual studion it run fine......but when I create installer and install application then run from installed exe then error occurs
|
|
|
|
|
Is there an app.config or yourapplicationname.exe.config in the installation folder?
|
|
|
|
|
app.Config.
I added this file in application folder of setup project
|
|
|
|
|
There is the problem. Say your application builds to an exe called Foo.exe , it expects the app config file to be named Foo.exe.config , not app.config . So you can't just copy the app.config into the installer directly.
Make sure the Installer project has "Primary output from your project name here (Active)" in it. As long as the app.config exists in the source project it should be installed with the correct name.
Also Greg Chelstowski's post is correct, you should consider using a ConnectionString element in your app.config rather than adding the connection string as an app setting.
|
|
|
|
|
Hi keefb
very Thankz
Problem is fix
|
|
|
|
|
Why do you not use ConfigurationManager.AppSettings["ConnectionString"].Value.ToString() instead?
Moreover, why do you store your connection string as an appsetting, and not as connectionString in your app.config?
var question = (_2b || !(_2b));
|
|
|
|
|
Thankz Greg Chelstowski
I change the connection string according to ur post
|
|
|
|
|
I am currently designing a quotation and would like to add a Valid Till date to show how long the quote is valid. For instance, if the quote was generated today, i would like the "valid till" date to be set from today plus 30 days. How would i do this in crystal syntax?
|
|
|
|
|
if i have a c# application.exe installed in a remote system can i get the ip of that system
if yes plz help me
|
|
|
|
|
System.Net.IPAddress[] myIpAddresses = System.Net.Dns.GetHostAddresses(Environment.MachineName);
<Edit> oops, only just saw you wanted remote machine. In that case just specify the HostName instead of Environment.MachineName like so...
System.Net.IPAddress[] myIpAddresses = System.Net.Dns.GetHostAddresses("SomeComputer");
</Edit>
<Edit2> OMG, i think I'm experiencing dyslexia!!
If you want to run the app remotely and get its machines IP use the 1st snippet, but like CG said it needs to be sent somewhere...
If you have the remote machines HostName you can use the 2nd snippet on the local machine.
</Edit2>
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
modified on Monday, September 7, 2009 5:22 AM
|
|
|
|
|
i need to find out all the machines running the application.exe how is that possible
|
|
|
|
|
Have application.exe get the IP address, and write it into a SQL database. That would be the easiest way to do it...
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
is it possible to use dataset in place of sql database, but i dont know how to transfer data from one machine to another using datasets.can u help me
|
|
|
|
|
Yes, if you write an app that runs on that remote machine, it can read and broadcast the IP address if you like. Of course, it needs somewhere to send it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|