Pregunta

Estoy añadiendo un elemento web directamente en un zonetemplate en un diseño de página.

Al insertar un elemento web personalizado que tiene un elemento web propiedad de tipo uint, consigo un error del servidor YSOD:

Analizador de error Descripción: Se produjo un error durante el análisis de una recurso necesario para atender esta solicitud. Por favor revise la siguiente Detalles de error de análisis específicos y modificar el archivo de origen adecuadamente. Mensaje de error del Analizador: El "Golpea" propiedad de tipo tiene "System.UInt32", que no es compatible con CLS

.

¿Cuál sería la forma más fácil para mitigar este error?

Me podría cambiar el tipo de datos int a, pero eso significaría cambiar un montón de código y de elementos Web archivos XML, y el cambio de gestión de errores y casos de prueba en consecuencia. Dado que el proyecto es enorme, una solución alternativa en el diseño de la página sería preferible ...

¿Fue útil?

Solución

I replicated the error, since I also have used UInt32's. I've never added them using SPD to a zone template, but instead used the web interface - which works fine though.

If you check the error stack and then use Reflector it makes a check (PropertyMapper.IsTypeClsCompliant) that the property is not of the UInt32 (and some others), so my guess is that there are no workaround.

Workaround is to use a CLS compliant type; for UInt32 an Int64 would work best and will probably not affect your solution that much.

Good luck mate!

Licenciado bajo: CC-BY-SA con atribución
scroll top