.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

IMPLICIT FTP (FTP with SSL ) in .NET 3.5

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :.NET Framework
I am writing C# code to connect through FTP  to a server which has only secure connection over port 990.
I have done EnableSSL true but not effect .
Please suggest a solution to this.
Has .NET framework 3.5 incorporated support for SFTP ?


View Complete Post

More Related Resource Links

Implicit-type lambda expression: is it possible?

Hi all, i was plaing around with LINQ and lambda expressions. I was trying to find duplicated files in my system. After a while a realized that duplicated could mean: - same name - same size and extension - ....   So i wrote this code: DirectoryInfo rootDirectory = ....; var groupFiles = selector => rootDirectory.EnumerateFiles("*", SearchOption.AllDirectories).GroupBy(selector).Select(g => new { g.Key, Info = g, Count = g.Count() }).Where(g => g.Count > 1); var groupsByName = groupFiles(f => f.Name); var groupsBySize = groupFiles(f => new { f.Length, f.Extension}); But i get the following error: Error 1 Cannot assign lambda expression to an implicitly-typed local variable So i tryed to make the type explicit and i realized that is not so easy. So what i'm missing?! IMPORTANT. 'm not tying to have the code working. I can solve the issue by duplicating code (even if i hate to do that) I'm rtying to improve my skills with LINQ and Lambda Expressions. Thanks all!!  

Implicit Transactions in Triggers


Here's my scenario:

First, I have two servers. In Server1 I have set up a Linked Server to Server2.

I have two databases on Server1. The first is the Customer database and the second is my Staging database. Server2 contains a database called Gateway.

I have AFTER INSERT, UPDATE triggers on tables in the Customer database that will insert records into tables in my Staging database.

The triggers on the tables in the Staging database will insert records into tables in the Gateway database on the Linked Server, Server2.

OK ... that is the setup. Now, the problem:

As you all probably know (and I didn't know until I started working with this), the statement in the Customer database that caused the trigger to fire, enlists everything in a transaction. If there is a problem several hops away with accessing the LinkedServer, then the entire thing is rolled back. IOW, the records in the table on the Customer database are never updated! This is bad (we can't mess with the functionality of our Customer's database, so our triggers there have to be fairly foolproof).

The trigger in the Customer database which INSERTS records into the Staging database should be ok and never fail (they are, after all, on the same Server). However, the trigger in the Staging database is where there could potentially be a problem if the LinkedServer is do

Does WPF implicit caching of static resources?



in my Application.Current.Resources.MergedDictionaries is a ResourceDictionary with theme specific resources. If the user selects another theme, the theme-depended control is removed from it's parent (Grid) and a splash screen is inserted instead. After replacing the theme-specific ResourceDictonary in the Application.Current.Resources.MergedDictionaries, the theme-depended control is created anew and replaces the splash screen. But, the control still uses the static resources from the replaced ResourceDirectory. Why? Is there any implicit resource caching in WPF? In the Silverlight port of the app, the static theme resources are applied correctly.  


Long to Int Implicit Convertion Error??



i have this type of code

long expiry_days = 121212212; //some long value here

if (expiry_days < 0)
                    return expiry_days;

but compiler issue a error that it can not convert long to int implicitly. My question why its require convertion here but there seems to be no need to do that :(. i rather assume that might be compiler inferring it from the if condition comparison i just change it to (expiry_days >(long)0) still same result why???

Thanks for Expert Opinions.

Localizing implicit type validation messages


I'm having trouble with the implicit type validation for model properties. The validation/error messages (for numeric fields explicitly) are printed in English (I want them to be printed in Swedish). Does anyone know how to override those messages? Or can I turn of implicit type validation?

The error message I'd like to translate/localize is "The field {0} must be a number."

implicit objects in asp.net


Hello all,

Are there any implicit objects like in JSP available in asp.net ?

Thanks in advance.

Implicit conversion from data type sql_variant to varbinary is not allowed


Here are my codes:

string strToday = DateTime.Today.ToShortDateString();
string strTime = DateTime.Now.ToShortTimeString();
DateTime dtmDate = Convert.ToDateTime(strToday + " " + strTime);

e.Values["insertDate"] = dtmDate;
e.Values["modDate"] = dtmDate;

And here's the error I got:

Implicit conversion from data type sql_variant to varbinary is not allowed. Use the CONVERT function to run this query.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Implicit conversion from data type sql_variant to varbinary is not allowed. Use the CONVERT function to run this query.

Implicit conversion between XML types


I have a stored procedure that accepts xml as input, and consequently calls the second procedure which again has xml as input.

For validating the input xml, I have created two schemas one for each of the procedure. The schema of outer procedure is slightly big one. The schema of second procedure is a subset of the first schema.

while trying to execute, I am getting an error, "Implicit conversion between XML types constrained by different XML schema collections is not allowed." 

The main procedure is exposed to other applications, The main procedure will internally call other procedures. That is why i have to ensure that while calling the main procedure, they should not have any extra input coming in to main one.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend