Welcome to Comunidad .NET de Cd. Juárez Sign in | Join | Help

Browse by Tags

All Tags » .net   (RSS)
[Web Service] Habilitar Variables de Sesión / Enable Session variables

Por defecto en los webmethods de los web services las variables de sesión están deshabilitadas, como por ejemplo en el siguiente código:

 [english] Webmethods has disabled the session variables by default:

        [WebMethod]

        public void Example()

        {

            // WebMethod Code

        }

 

Para habilitar las varibles de sesión lo único que tenemos que hacer es:

 [english] To enable the session variables just we need to write: 

        [WebMethod(EnableSession = true)]

        public void Example2()

        {

            // WebMethod Code

        }

 

Espero os sea útil, hasta luego 

I hope it will be usefull for you byeeeeee 

 

LinQ & Ruby lo que más Suena en Malaga

Bueno después del primer día de charlas, el balance es bastante bueno.

 Hoy nos han contado muchas cositas, WPF, Software Engineer, Sharepoint services, Ajax, security.

Pero lo que mejor pinta tiene como avisa el título del post ruby(un lenguaje de programación) y linQ(acceso a datos desde .net para diferentes fuentes de forma uniforme, xml, sql, objetos).

Varios de los ponentes han hablado bastante bien de ruby, habrá que probarlo :D.

Para los amantes de C# comentar que incluso gente que sabe mucho de VisualBasic ha comentado que C# es "mejor"  en ciertos aspectos.

 Bueno para la gente que no tenga ni idea de que son algunas es normal, yo hace unos meses tampoco la tenía, para los curiosos siempre quedará la wikipedia, y en la bloguera seguro que postearemos más cositas al respecto de estas nuevas tecnologías de microsoft para profesionales.

Y mañana más!! nos vamos a dormirrrrrrr zz zzzzz zzzzzz 

Luego pondremos alguna fotillo. 

Ramón y Sebas @ Malaga, Torremolinos SaludeTES

[Off-Topic] Ya estamos en Malaga

Hemos llegado bien STOP

La Alhambra y las cañitas de Granada (Nuestra parada para la comida) STOP

Despues de una larga de charlita tecnológica muy interesante esta noche nos vamos a dormir, que mañana a las 7 y 15 arriba STOP

 
Las wifi sin seguridad son lo mejor!! STOP

 

En próximos Posts intentaré contar más cosas sobre las conferencias, dice Ramón que apague el ordenador y me vaya para la cama :D:D:D, hasta mañana

 
Continuará

 

Nos vemos en el OktoberFest de Malaga, ¡SE BUSCAN NUEV@S BLOGUERs PARA LA BLOGUERA!!

Los días 15 y 16 de Octubre se celebra en Málaga el OktoberFest

Es la primera Conferencia a la que voy a asistir e más de un día, y la verdad es que me resulta bastante atractiva la idea, son muchos conceptos en muy poco tiempo pero tal vez eso es lo bonito de este tipo de eventos, luego cada uno tendrá tiempo de profundizar más en las tecnologías que mas les hayan gustado o las que necesiten y puedan ser realmente útiles en el día a día de su trabajo.

Intentaré comentar algo sobre ella en próximos posts.

 Objetivos para un novatillo en este mundillo como yo:

- Intentar coger el máximo número de conceptos posibles.

- Conocer gente y reencontrarse con viejos conocidos, incluso poner cara a algunos de los blogs tecnológicos que suelo leer en geeks.ms y en labloguera.net .

- Disfrutar, porque aunque a algunos les parezca mentira, el mundillo de la informática también puede llegar a ser divertido, y que mejor que hacer en la mayor medida tu trabajo algo que te divierta.

- Y BUSCAR NUEVOS BLOGUERS para LABLOGUERA.NET

         - Requisitos necesarios: Querer hacerse un blog técnico en el cual ir compartiendo las experiencias tecnológicas con todos los internautas.

         - El blog es gratuito, puedes hablar de cualquier tipo de tecnología, tienes la ventaja de ser miembro de una comunidad, la unión hace la fuerza. En la bloguera tienen cabida todo tipo de gente a la que le guste la tecnología.

         Os podeis apuntar directamente creando un usuario en www.labloguera.net y despues enviando un correo a lablogueraARROBAgmail.com diciendo cual es vuestro usuario en la bloguera, cual quereis que sea el título de vuestro blog y sobre que vais a hablar. O si teneis alguna duda más enviarme un correo a mi dirección sebichusARROBAgmail.com

 
 

 

Line numbers in all the files in your Visual Studio / Números de linea en todos los archivos en tu Visual Studio

Bueno esto es una tontería para los más expertos, pero para gente que este empezando a trabajar con el visual stdio puede llevar un rato encontrar el como activar los números de linea del código que aparecen a la izquierda y que son muy útiles para la depuración.

Primero en la barra de menu ir a Herramientas, luego dentro de herramientas ir a opciones y te saldrá el siguiente cuadro de dialogo...

 

Dentro de esta ventana tienes que ir a Editor de Texto, luego Todos los lenguajes y finalmente tienes que seleccionar en Mostrar Números de línea. 

Es una opción que inicialmente en mi visual studio 2005 venía desactivada y  supongo que le habrá pasado a más gente. Esta es la razón principal del post. Espero que os sea útil.

 ________________________________________________________________________

IN ENGLISH ...

 


 For the most experts this post has nonsense, but for the visual studio begginers could spend a while till find how swith on the option of display line numbers which appear at the left of the document which you are working and they are so usefull for debug.

First of all at the menu bar click  Tools, then click options and the dialog box which is in this post picture will appear.

In the dialog box you have to go to text editor, then to all languages and finally go to Show and check the line number option.
 

Is an option that in my visual studio 2005  was uncheck and I guess that it happens to more people, this is the main reason of this post. I hope it will be helpful.

 sorry for my english
 

Problems publishing Web Service Error<connectionStrings/> in IIS

IN ENGLISH ...

In a web service which was working I had to change the .cs file because I had changed the code, and after change it in the iis when I called the webservice url, happens the error in line xx  <connectionStrings/>

Finally I solved it changing the permisions of the folder in the IIS and giving all the permisions again less the examine permision. The problems of permisions usually give a lot of headhaches :D ...
 

sorry for my english 

 

 EN ESPAÑOL ...

Problemas  publicando Web Service Error<connectionStrings/> en IIS

En un web service que estaba funcionando tenía que cambiar el archivo .cs ya que lo había modificado, y después de modificarlo al llamar a la url del web service que comenzó a salir el error en linea XX  <connectionStrings/>

 

Al final lo solucioné cambiando los permisos de la carpeta en el IIS y volviendole a dar todos los permisos menos el de examinar. Los problemas de permisos, que suelen dar mucho quebraderos de cabeza.

 

ALGO CURIOSO que encontré mientras buscaba que podía estar pasando.
Como hacer un web service con el editor de notas, en elguille.net ...

 http://www.elguille.info/NET/ASPNET/crearServicioWeb.aspx

 
Un link a un foro en el que se explica Como publicar un web service en el IIS:

http://www.baleareson.net/forums/t/183.aspx

C# 3.0 Specification Available / Especificación Disponible

Os la podeis descargar (en inglés) en ... / You can download it in ...

http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/CSharp%20Language%20Specification.doc

 

 Lo leí en / I read it in ...

http://blogs.msdn.com/wriju/archive/2007/08/01/c-3-0-specification-is-available.aspx

Working with Directories and Files C# .net

These days I am working with a webservice which has to work creating, deleting file and folders. In this post i will try to explain how I worked with the elements about File and folders which are in the .net framework.

 

 About Files:

You can work with File or FileInfo both in System.IO . Since my point of view depending what do you need to do is better use one or another. File is for work with files in a quick way, just make an action and forget it, the most of the methods needs the url file and they return void, a quick action like :

 File.AppendAllText("c:/error.txt", "Text to add in the file error.txt");

This line create the file error.txt if it doesn't exist and append the text. there are more methods you can just look it in the VStudio's intellisense. And one advantage is that you don't need to create a File object to work with it, because is a static class.

 
And the second way FileInfo is maybe a better way if you will work more than once with the same file, if you need give it permissions, or do more than one action, because first you have to create the object:

 FileInfo file = new FileInfo("UrlFILE");

and then you can make till I saw more or less the same actions than with File but without put the url each time.

 

With Directories is more or less the same

, the .net framework has  Directory y DirectoryInfo

  they have the same use than File and FileInfo, but with the differents with Files.

 For example Directory.Copy doesn't Exist, so We had to make our own directory library, for example the Copy method is :

 

public void CopyDirectory(string url_source,string url_destine,bool overwrite)
 
{

            if(overwrite)

                Directory.Delete(url_destine,true);

           

            if(!Directory.Exists(url_destine))

                 Directory.CreateDirectory(url_destine);


            string path_file_destine = string.Empty;

 

            foreach (string file in Directory.GetFiles(url_source))

            {

                path_file_destine= url_destine+Path.GetFileName(file);

                File.Copy(file, path_file_destine);

            }

 

            foreach (string sub_dir in Directory.GetDirectories(url_source))

                CopyDirectory(sub_dir+"/",
                    dir_Destino+Path.GetFileName(sub_dir)+"/",overwrite);


        }

 

When you can't delete a Directory sometimes is because you are working with it, or another program is working with it or because some file or directory which is in the Directory has ReadOnly permissions, to change a file permissions:

File.SetAttributes("path_file", FileAttributes.Normal);

 and for change the Attributes to a directory you need to use DirectoryInfo, it isn't in Directory

 

Sorry for my English

Luego cuando tenga un rato, lo pongo también en español. 

First Steps / primeros pasos framework 3.5

Bueno hace unas semanas empezé a buscar cosas sobre el framework 3.5, encontrando bastante poco sobre el tema, pero al final he encontrado algo interesante que os dejo aquí...

Some weeks ago I began to search things about the framework 3.5, I found few about it, but finally i have found something interesting ...

 

Para descargarlo / To download it

http://www.microsoft.com/downloads/details.aspx?familyid=d2f74873-c796-4e60-91c8-f0ef809b09ee&displaylang=en

 

Mejor descargarse también el Orcas (Visual Studio 2008) Beta2, porque lleva ya el framework 3.5


 Better download Orcas (VS 2008) because it has the framework 3.5

http://www.microsoft.com/downloads/details.aspx?familyid=1DF11844-3C90-4FB8-A78F-4BA95ED0B370&displaylang=en 

 

 Un video con los detalles generales del framework 3.5 es en inglés/ A video with the generic details

http://channel9.msdn.com/Showpost.aspx?postid=333940

 

El video esta bien pero es un vistazo demasiado general, sobre todo para los que quieran saber más sobre el framework.

The video is ok but is just a generic look
 

 

Posts de donde he sacado información.. / Posts from I toke information ... 

http://geeks.ms/blogs/amezcua/archive/2007/08/17/un-vistazo-de-alto-nivel-a-las-novedades-de-net-3-5.aspx

http://geeks.ms/blogs/jorge/archive/2007/08/08/los-nuevos-controles-de-asp-net-3-5.aspx

 

 

Continuará ...

to be continued ... 

Expresiones Regulares para el mail / Regular Expresions for the mail .net

Descripción del problema : Problemas con la consistencia de los datos en campos que tienen que tener una determinada estrutura como el mail. El viejo código aceptaba ñs, y aceptaba acentos, supongo que dependerá del idioma del explorador lo que acepte. El siguiente link muestra un ejemplo para hacerlo a través de código, cuya expresión regular no me sirvio.

Problem Description :  Problems with the data consistency in fields which must has a structure like the email. The next link has an example (is in spanish, but the code is the code so ...) to validate mail adresses. Maybe with an english browser you don't have this kind of problems, but with a spanish browser I had it.

 
http://msdn2.microsoft.com/es-es/library/01escwtf(VS.80).aspx 

 

Otro link interesante para poder quitar carácteres no válidos de strings es el siguiente :

Another link, this one to delete characters which isn't valid  

 http://msdn2.microsoft.com/es-es/library/844skk0h(VS.80).aspx

 

más links para trabajar con expresiones regulares / more links for work with regular expresions ...

MICROSOFT WEB http://www.microsoft.com/spanish/msdn/articulos/archivo/201205/voices/regex.mspx 


http://www.regular-expressions.info/
MUY BUEN LINK / VERY GOOD LINK 

 

Las expresiones regulares con las que trabajé yo ... / The regular expresions which I have worked ... 

 

 El código antiguo / The old code:

 
 "\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"

 

El código nuevo / The new code

"[a-zA-Z0-9._]+([-+.][a-zA-Z0-9._]+)*@[a-zA-Z0-9._]+([-.][a-zA-Z._]+)*\.[a-zA-Z._]{2,4}"

 

 

 

Y para los más curiosos. Link a posts escritos por Ramón Tebar en su blog, también sobre expresiones regulares ...

    http://labloguera.net/blogs/rtb/archive/tags/Expresiones+regulares/default.aspx(SPANISH)

 

 

Imagine Cup 2008

Googleando un poco ya se puede ver info acerca de la próxima imagine cup ...

Googling a little you can find info about the next imagine cup ... 

 
http://jaimelopezvivas.wordpress.com/2007/07/24/imagine-cup-2008/(spanish)
 

también se puede ver el que parece ser el logo ...

And you can see the posible logo ...
 

http://chesini.blogspot.com/2007/07/imagine-cup-2008-tenemos-logo.html(spanish)

 

Cosas que ya habían dicho en la bloguera también :

 
http://labloguera.net/blogs/rtb/archive/2007/07/07/imagine-cup-2008.aspx(spanish)

 

Y como dicen que cuando el rio suena agua lleva. 

 And as the people say when the river sounds it brings water (this is a bad translation of the topic setence that i wrote before)

Asi pues dos palabras / So two words :

Medio Ambiente / Nature Enviroment

Francia / France 

TO BE CONTINUED (como dice Peter el compilador de mundos)

Continuará ...
 

 

 

Connection Strings a Cualquier BBDD / to whatever DataBase

I read this the other day ...

 http://www.subgurim.net/Articulos/asp-net-general-articulo123.aspx (IN SPANISH)

 It has an interesting link, where you can learn more about connection strings to whatever data base

http://www.connectionstrings.com/ 

I hope the link will be useful 

 

Leí esto el otro día sobre connection strings

 http://www.subgurim.net/Articulos/asp-net-general-articulo123.aspx

Tiene un link muy interesante, donde puedes parender mas sobre cadenas de conexión a cualquier bbdd

http://www.connectionstrings.com/

Espero que os se util!! 

Web.Config(.net , sql) for noovies / para novatos

The last days some mates at work told that my post aren´t technical just off-topics :D, I think that developer's work, and work in the technology world is more than tech it has a lot of things around and mixing all you will get better results than if you just take the tech way.

Estos últimos dias compañeros en el trabajo me dijeron que mis post no son técnicos son más fuera de este tema, Pienso que el trabajo de un desarrollador y el trabajo en el mundo de la tecnología es más que tecnología, tiene muchas cosas alrededor y mezclandolas todas tendrás mejores resultados que si solo coges el camino tecnológico.

 So comming back with the post's topic I will write a little bit about ConnectionStrings with .net and sql

Bueno volviendo al tema del post ahora voy a contar un poco sobre cadenas de conexión o ConnectionStrings trabajando con .net y bases de datos sql.

 
 ConnectionStrings are inside of the tag <appSettings> in the web.config . Inside of this tag we can have keys (variables) which we could use in a general way in all our website and If some is changed in the configuration's parameters you just will have to change the web.config file.

Los ConnectionStrings estan dentro del campo <appSettings> del web.config . Dentro de este campo podemos añadir también claves (variables) que podremos usar de forma general en todo el sistema y que posteriormente solo tendremos que cambiar en el web.config para que afecte a toda nuestra web.

The motivation of declare this kind of variables in the webconfig is simple, you don't need compile again when you have your website is in production. I you have this important values in the code you should compile and generate the project again. So the change in the web.config is faster and more reliable.
 

El porque de declarar este tipo de variables en el webconfig es muy sencillo, ya que evitas tener que volver a generar el proyecto que ya está en producción, ya que si tuvieras estos valores en código lo deberias hacer, y el cambio en el web.config es más rápido y fiable. 

 

============================================
Examples / Ejemplos

 ===========================================

A simple connection string between .net and a sql database / Una cadena de conexión simple entre .net y una base de datos sql

<add key="Name_of_our_ConnectionString" value="web's workstation id" or IP ( in quotation marks ) ;packet size=4096;user id=NombreUsuarioBBDD;pwd=PasswordUsuario;data source="database's workstation id" or IP of the computer where the database is( in quotation marks );persist security info=False;initial catalog=nombre_de_la_BBDD" />

<add key="Nombre_de_nuestro_ConnectionString" value="Identificador de la máquina sobre la que esta trabajando la web" o IP (Entre comillas simples) ;packet size=4096;user id=NombreUsuarioBBDD;pwd=PasswordUsuario;data source= IP del equipo donde se encuentra la bbdd a la que accedemos desde nuestra web(Entre comillas simples);persist security info=False;initial catalog=nombre_de_la_BBDD" /> 

In the same web.config can be  more than one ConnectionString

 En un mismo web.config puede haber varias cadenas de conexión
 

  Declaring variables in web.config / Declarando variables en el web.config

       <add key="Name_Variable_WConfig" value="whatever string" /> (inside of appsettings)

      <add key="Nombre_Variable_WConfig" value="El string que quieras" /> (dentro de appsettings)



 Using the variables of web.config(appsettings) in your c# code / usando las variables del web.config (appsettings) en tu código c#

 Local_Variable=System.Configuration.ConfigurationSettings.AppSettings["Name_Variable_WConfig"];
 

sorry for my english, regards, salu2

.net Framework 3.5 i need HELP!! / necesito AYUDA

Bueno pues hoy hemos tenido una reunión en el trabajo sobre el proyecto que estamos empezando (Cuadernia, e-learning) en el cual nos han dicho que nos empecemos a pegar de tortas con el .net Framework 3.5 ya que tendremos que adaptar las implementaciones a esta nueva versión del framework .net. Cuando todavía no controlo mucho el 2.0 y mucho menos el 3.0 .

Today we have had a meeting at the work about the project which is just beggining (Cuadernia e-learning) In this meeting one of the points was that we have to begin to read about .net Framework 3.5 that we must to adapt our implementation to it. When even i don't control to much 2.0 and less 3.0

Os dejo aquí el link a un artículo sobre el tema y espero ir poniendo alguno más. Si sabeis algo sobre el tema no dudeis en comentarlo... 

Here You have some links to news about .net Framework 3.5 and I hope put more in the future. If you know something about, just comment it!

Artículo Breve/Shortly Article(in spanish)

 

 La última versión (Esta en ingles, si lo veo en español luego lo pongo):

The latest version: 

3.5 Beta 1 / April 27, 2007

 

sorry for my english but i want to practice it, is the best way to improve :D