|
Unfortunately, I really don't know what you tell you. Using HttpWebRequest for an HTTPS connection is seamless (well, except for you in this case ). You should try writing a simple app that just downloads the content from any given URL and try connecting to a few other sites that implement HTTPS just to see if it's not something with your installation (although I can't imagine what that'd be).
Sorry I can't be of more help, but this should work and the fact that it works if you use IE or something else just compounds the problem.
Good luck!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I'm trying to sort the data in my table, but no matter what I do with the Sort property, the resultant data does not change it's order at all. Does anyone know what I'm missing ? The authors of MSDN apparently missed it too, if there's a step I need to take...
DataSet comparisonDocs = facade.CompareMetadata(objectVids, elementPaths);<br />
DataView compSort = new DataView(comparisonDocs.Tables[0]); <br />
compSort.Sort="Title, Version/Major DESC, Version/Minor DESC";<br />
comparisonRepeater.DataSource = compSort;<br />
comparisonRepeater.DataBind();
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Is Version/Major supposed to be a field name? If so, try [Version/Major] . If you mean the Major field from the Version table, use . instead of / , although I'm not sure how that'd work in this case since your DataView is over a specific DataTable . If Version is a related table (and a DataRelation is established between the two), then use Child(RelationshipName).FieldName which should work.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Version/Major is indeed a field name. I didn't know that / was reserved in SQL, but I initially sorted by Title only, so I'm not sure that the [] is going to help ( it didn't sort by Title when I just specified 'Title' as the order by before ). Also, when I got the name wrong ( I'm not responsible for the schema ), and just put VersionMajor, it blew up on the basis that the column did not exist, so it presumably can see that Version/Major is a column name the way the code stands.
Have you used the sort property before ? It's supposed to work just the way that I'm trying to use it, isn't it ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
try:
DataView compSort = comparisonDocs.Tables[0].DefaultView;
|
|
|
|
|
Thanks, I did that. It turned out the sort was working, but the way the old code ( which I didn't write ) got it's details to render involved an array of objects instead of the data in the table...
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Glad to see you got it working. I had a reply sitting at work that I couldn't submit because the site wasn't working ("The resource is in use").
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Why don't you try prefixing the field with the table name followed by a period.
[EDIT]
Just read you got it working, sorry, I should read through everything before posting!
[/EDIT]
- Nick Parker My Blog | My Articles
|
|
|
|
|
I've been developing a project using VS.NET 2003 for well over a year. Today I'm building the installer (Setup.msi), and when I test it out, I get the usual "Preparing to install files" (or whatever) message box, and then I get a message box that says "<error message="">".
I haven't changed that much in my solution lately. I had recently installed the .NET bootstrapper plug-in, but even after uninstalling that, I still get that when I build installers.
Any ideas or tips? Any ways I can effectively debug the MSI or get some verbose logging?
Thanks,
Arun
|
|
|
|
|
If you read the Command-line Options[^] for Windows Installer, you could construct the following command-line for verbose logging:
msiexec.exe /I Setup.msi /L*uv Setup.log Typically, find the first error reported (although sometimes errors occur that aren't vital for the installation to continue, so ignore those).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks!
Turns out it was an invalid (empty) launch condition that lingered around instead of being deleted.
|
|
|
|
|
I have a MDI application in which one of the child windows opens a modal dialog. If the focus is switched off the MDI app to some other open app, Windows seems to loose track of the MDI app (can't alt-tab to it, etc.) until focus is restored to the dialog by clicking on it. But every time focus is shifted, the MDI form is set as the focus and not the modal dialog. How do I prevent Windows from seemingly losing track of my app? I have added code to the MDI form's Container Activated event which gets around this problem seems like a very convoluted way to solve the problem.
Thanks in advance
~ D
|
|
|
|
|
Hi!
I want to make an Excel 2003 Add-in in C# that, when is loaded by the user, it opens a Form.
I have searched in several sites and until now I only found how to make add-ins that are automatically loaded when Excel starts.
Does anybody can help me?
Thanks!
Paulo
|
|
|
|
|
You should start by reading the content in the Microsoft Visual C# Developer Center[^] for the Office 2003 System. This includes many, many articles and other topics about add-ins and other enhancements to Office using .NET.
The basic idea is that both Office and Visual Studio utilize a DTE (design-time environment) that is very extensible, but you must read the documentation to know how to do it. There are many articles if you look in the right place, and that link above is the best place to start.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi all,
I am getting the following error when trying to update database table:
"Error: Update unable to find TableMapping['Table'] or DataTable 'Table'.
Here is the code snippet that is throwing the error (specifically, the Update() command )
if (upDateFlag)
{
//update
SqlConnection dataConnection = new SqlConnection("Integrated Security=true;" +
"Initial Catalog=SPIRIT2TEST;" + "DataSource=TECHSERVER") ;
SqlDataAdapter adap = new SqlDataAdapter("SELECT * FROM Dept", dataConnection);
adap.Update(changedDataDs, "Dept");
ds.AcceptChanges();
}
catch (Exception e)
{}
Can you please point out what I might be doing wrong...
Thanks
|
|
|
|
|
According to this snippet, you have no SqlDataAdapter.UpdateCommand , InsertCommand , or DeleteCommand . How do you expect the SqlDataAdapter.Update call to update the database based on the connection and changes in changedDataDs ? You need to either assign the appropriate SQL statements with the properties I mentioned above, or use a SqlCommandBuilder when you specify the fields (instead of an asterisk in your SELECT statement).
Also, you don't need to call DataSet.AcceptChanges after calling SqlDataAdapter.Update , since Update calls AcceptChanges for you.
Finally, just because your SELECT statement includes "Dept" for a table doesn't mean that changedDataDs does. This is most likely the source of your exception, though even if it did contain the "Dept" table the lack of UPDATE, INSERT (typically separated by a semi-colon along with a SELECT to make sure auto-assigned fields are filled-in correctly), and DELETE commands would also throw an exception.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
In a winapp i embed a web browser control and a richtextbox control,for one way i use :"richTextBox1.Text=((mshtml.HTMLDocument)axWebBrowser1.Document).documentElement.innerHTML " to get html file to richtextbox, after modify this content ,how can i get it to mshtml?
|
|
|
|
|
Cast AxWebBrowser.Document to UCOMIPersistFile (a COM interface declared in .NET in the System.Runtime.InteropServices namespace; casting a COM-imported interface performs a QueryInterface for it) and use the Load method:
richTextBox1.SaveFile("temp.html",
RichTextBoxStreamType.UnicodePlainText);
UCOMIPersistFile file = (UCOMIPersistFile)axWebBrowser1.Document;
file.Load("temp.html");
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Do the method you give above work like this :richtextbox->file->be loaded in
axWebBrowser?
Every time the browser want get the content of richtextbox,it should first convert
to .html file?
are there some differences with underside?
richtextbox1.SaveFile("temp.html", RichTextBoxStreamType.UnicodePlainText);
object oEmpty =null;
axWebBrowser1.Navigate("temp.html", ref oEmpty, ref oEmpty, ref oEmpty, ref
oEmpty);
|
|
|
|
|
You said you copied the actual HTML into the RichTextBox , so I can only presume that the RichTextBox contains HTML markup. In this case, you can do exactly what I told you that you can do, or you can use Navigate or Navigate2 . Either way works. If you understand COM and read Programming and Reusing the Browser[^], you'd see that the coclass for IHTMLDocument also implements IPersistFile , which is declared in .NET as UCOMIPersistFile as I said before.
If you're looking for something to convert RTF to HTML, then you should use google[^] to find such a component (or, for internal applications where you have control over system dependencies, you can interop and use Word). Nothing in the .NET BCL (base class libraries) provides such functionality.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
now i think to save html file to memorystream,then to load it to axWebBrowser,how can get it?thank you again!
|
|
|
|
|
IIRC, WebBrowser.Document also implements the IPersistStream interface, but some work will be required. Not only do you have to declare the IPersistStream interface correctly (don't forget the right IID in the GuidAttribute and use the ComImportAttribute ), but also the IStream interface, which you'll need to implement in a class that can read from a MemoryStream - basically used to transfer the buffer as the WebBrowser will request it from the IStream interface.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i declare the IPersistStream interface as below:
public interface IPersistStream
{
[PreserveSig]
int IsDirty( );
void Load([In] UCOMIStream pStm);
void Save([In] UCOMIStream pStm, [In, MarshalAs(UnmanagedType.Bool)] bool fClearDirty);
void GetSizeMax(out long pcbSize);
};
the i implement it form WebBrowser as below:
IPersistStream file = (IPersistStream)axWebBrowser1.Document;
But VS.net said it's not valid,why?
|
|
|
|
|
Don't forget that you need to attribute imported COM interfaces with the ComImportAttribute , otherwise casting will be type casting instead of QI'ing for the COM interface.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
ye,i declared it :
[ComImport,InterfaceType(ComInterfaceType.InterfaceIsIUnknown),Guid("00000109-0000-0000-C000-000000000046")]
|
|
|
|