|
|
Quit Double Posting[^]
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi friends,
I had a website running in my local computer with no problem. When I tried to uploaded to my server all the DB permissions were messed up. I tried to reproduce the error in my local PC but I ended up messing up my site config,
I'm using memberships to manage accesses to my site. I want to create a website from scratch so I will have a brand new ASPNETDB database. How can I do this? I have created several new websites in different folders in VS but that only created the App_Data folder with no database in it.
How can I start from scratch???
Thanks a lot
|
|
|
|
|
I have a class SubClass that inherits from class Base.
I have an array of type Base that I want to serialize. So, that the serializer knows about all the possible subclasses, I called the constructor like so:
XmlSerializer s = new XmlSerializer( ObjectType, extraTypes );
where extra types is an array of types that includes SubClass.
When I make this call to the constructor, I get the exception:
Outer exception: There was an error reflecting type 'Subclass'
Inner exception: Types 'Subclass' and 'Subclass' both use the XML type name, 'Subclass', from namespace ''. Use XML attributes to specify a unique XML name and/or namespace for the type.
There clearly aren't two classes with the same name or my code wouldn't have compiled.
Any thoughts on what my problem could be?
modified on Tuesday, June 10, 2008 3:03 PM
|
|
|
|
|
Eric Burns wrote: Any thoughts on what my problem could be?
Dump the xml schema from the Type/Graph and see why 2 different types are created.
|
|
|
|
|
I have a Node that has a collection of Labels. The user can click on the node and view the properties in a PropertyGrid. If the user clicks on the collection of labels they can add/remove labels via the Collection Editor.
How do i listen for when the user has added a new label to the collection?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Gareth H wrote: How do i listen for when the user has added a new label to the collection?
What version of .NET are you in. AFAIK in 2.0 there are no notifications. The form makes a local copy (or even more than one) of the collection and modifies the copy and returns it to you (if I remember correctly). The way I dealt with that was I made my own form that was an exact duplicate of the built in one and added my own events to it, like OnAdd, OnDelete, OnChange or some such. Oh, also it modified directly the collection you gave it.
If you find a better way, particularly if something is added in 3.X, please a reply to me. Thanks.
led mike
|
|
|
|
|
led mike,
I am using .NET 3.5. I will carry on looking and tell you if i find anything.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I had some code in a Button event that took for ever to run causing my main form to freeze. To get past this I have now decided to move the processing to a sepperate Thread instead. Now I have a problem with the ProgressBar which gives me the below error when running the application.
Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.
Below is how I have changed the Button event and the start of my new thread.
private void btnRun_Click(object sender, EventArgs e)
{
Thread excelrun = new Thread(RunExcel);
excelrun.Start();
lblPercent2.Visible = true;
lblRecordProcessed.Visible = true;
lblProgText.Visible = true;
lblProgress.Visible = true;
}
And now the start code of the Thread.
private void RunExcel()
{
string filepath;
filepath = txtboxSelectTxtFile.Text;
FileHelperEngine<readfile> engine = new FileHelperEngine<ReadFile>();
engine.ErrorManager.ErrorMode = ErrorMode.SaveAndContinue;
ReadFile[] res = engine.ReadFile(filepath, 1);
ReadFile[] mes = engine.ReadFile(filepath);
int progrval = 0;
progrval = progressBar1.Value;
progressBar1.Minimum = 0;
progressBar1.Maximum = engine.TotalRecords;
progressBar1.Visible = true;
</readfile>
Any help would be appreciated.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
This question gets asked a couple times a week in this forum. Did you try searching for your error message?
Short answer: you can access controls only from the thread that created them.
Longer answer: use a BackgroundWorker component to do your work. It has a ProgressReported and RunWorkerCompleted event which you are allowed to access your controls on.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
Thanks for the reply. I always search for answers before I ask but I get nothing returned when searching. Thanks again for the help. Much appreciated.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
|
Hello,
you should call the method that handle the progress bar using a delegate
so create a new delegate that point to the method and verything run usefull
dghdfghdfghdfghdgh
|
|
|
|
|
Hello,
you should call the method that handle the progress bar using a delegate
so create a new delegate that point to the method and everything run usefull
dghdfghdfghdfghdgh
|
|
|
|
|
I have set up a simple application to connect to the internet and download the contents of a file from time to time, for example a file containing quotes that are to change on daily basis.
This has been set up correctly - the connection is made (using HttpWebRequest and HttpWebResponse...) and the contents are downloaded . However, running the application more than once will than display the same contents that were first downloaded. This can go on from a few hours to a few days! I don't know what is going on, but I believe that the program is accessing some cache from somewhere instead of downloading the stream once again.
I need the program to download the stream from the internet every time it is running - and ignores any cache or whatever it is that is storing the stream data. What am I to do?
|
|
|
|
|
Change the CachePolicy[^] of the HttpWebRequest.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
Thanks a lot pal. Just what I was looking for!
|
|
|
|
|
I looking for some way to show ip address in my UI ( Win Form ).
I don't find it in the standard controller of VS 2008.
I need something simple - like UI ip controller that was in MFC.
Someone can help ?
How can i find it in VS2008 ( C# )
|
|
|
|
|
I don't believe there's a built-in WinForms or WPF IP address control. But a quick google search reveals several articles on this site that show how to create one.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
can anyone tell how to use regex to fetch url's from a page
i'm getting the whole page using webclient class.
i want to know how to use mshtml to parse the text of page and get the list of url's from it.
i want to know the way to use regex??
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
If you download Expresso ( www.expresso.com ) it will help you learn how to use regex. It probably has a sample regex in it for URLs, too.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi maby someone can help me with this... I wrote a silverlight chart that gets it's data from a wcf service using linq to sql the following code fails and I have no idea why.
DataClasses1DataContext db = new DataClasses1DataContext();
var speeds = db.sao_GetMonthlyInterfaceData(Convert.ToInt64(code), routerSpeed, dateFrom, dateTo);List<String> values = new List<string>();
List<sao_GetMonthlyInterfaceDataResult> sp = speeds.ToList<sao_GetMonthlyInterfaceDataResult>();
IEnumerator<sao_GetMonthlyInterfaceDataResult> enumerator = sp.GetEnumerator();while (enumerator.MoveNext())
{
sao_GetMonthlyInterfaceDataResult val = ((sao_GetMonthlyInterfaceDataResult)enumerator.Current);
String ret = "";
ret += Convert.ToString(val.BpsIN );
ret += " ";
ret += Convert.ToString(val.BpsOUT);
ret += " ";ret += Convert.ToString(val.UpdateTime);
values.Add(ret);
}
return values;
</pre>
Maby someone out there can help with this.
Thanks
S
<div class="ForumSig">Stephen Lintott Bsc IT (RAU)</div>
|
|
|
|
|
It's hard to diagnose a problem with no description of what line in particular is failing as well as what message you're receiving.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
When running the app I get the following. In the previous code if I remove the LINQ call the error seems to disapear... Sorry for not including the error, after looking at this code for the time I have one tends to forget that everyone doesn't have the same problem.
Thanks
S
An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|