473,699 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_err or and windows 2003

I have a problem with the application_err or event being fired from my
asp.net application with windows 2003 server standard edition. The
event fires fine from my test machine (XP) and all works well. However
the event never appears to fire from windows 2003. I have tried just
about everything and can not find an answer. I cannot debug through the
windows 2003 server as I do not have VS installed on it plus it is a
live server

Can any one help?
Sub Application_Err or(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
Dim LastError As Exception = Server.GetLastE rror
ErrorHandler.Ex ceptionToString (LastError)
Server.ClearErr or()
Response.Redire ct("~/Error.html")
End Sub

Nov 19 '05 #1
6 1433
Hi,

Are you trying to test the exception management code of your app in ur
Win2k3 server? In other words, are you purposefully thowing an exception to
see whether it's handled properly?

If yes, how exactly are you doing that?

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.rakeshrajan.com/
"Rippo" wrote:
I have a problem with the application_err or event being fired from my
asp.net application with windows 2003 server standard edition. The
event fires fine from my test machine (XP) and all works well. However
the event never appears to fire from windows 2003. I have tried just
about everything and can not find an answer. I cannot debug through the
windows 2003 server as I do not have VS installed on it plus it is a
live server

Can any one help?
Sub Application_Err or(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
Dim LastError As Exception = Server.GetLastE rror
ErrorHandler.Ex ceptionToString (LastError)
Server.ClearErr or()
Response.Redire ct("~/Error.html")
End Sub

Nov 19 '05 #2
Yes. I am purposefully throwing an exception. Like my original post
says I can get the error to display on XP but not on Windows 2003.

I have had a further thought and may think that this may be a
permission issue. The server in question is running the Ensim control
panel and it does stuff with user accounts that locks down IIS pretty
well. So for a check what group does the IIS user need to allow for
application_err or to be fired?

At the moment the user is w#21 and groups are AllUsers@n2cb, iis_wpg
and wvh_anon_users_ group

Nov 19 '05 #3
Hi,

I don't think permissions plat a role in application_err or. My hunch is
there should be a permission problem in what is being done within the
application_err or handler. And maybe that is the reason why it seems like the
error event is not firing.

Could you please post the code written in application_err or?

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.rakeshrajan.com/
"Rippo" wrote:
Yes. I am purposefully throwing an exception. Like my original post
says I can get the error to display on XP but not on Windows 2003.

I have had a further thought and may think that this may be a
permission issue. The server in question is running the Ensim control
panel and it does stuff with user accounts that locks down IIS pretty
well. So for a check what group does the IIS user need to allow for
application_err or to be fired?

At the moment the user is w#21 and groups are AllUsers@n2cb, iis_wpg
and wvh_anon_users_ group

Nov 19 '05 #4
You could be right. I have set the full control permissions for the
asp_net account in reg edit for the event log WriteToEventLog function.
May be it is that that is causing the problem. I will write some code
to see.

Code below in case it could be something else

in web.config
<!-- CUSTOM ERROR MESSAGES -->
<customErrors mode="On" defaultRedirect ="~/Error.aspx" >
<error statusCode="404 " redirect="~/"/>
</customErrors>
in globbal
Sub Application_Err or(ByVal sender As Object, ByVal e As EventArgs)
Dim LastError As Exception = Server.GetLastE rror
ErrorHandler.Ex ceptionToString (LastError)
Server.ClearErr or()
Response.Redire ct("~/Error.html")
End Sub
------------------------------------------------
ErrorHandler.vb

Imports System.Reflecti on
Imports System.Text.Reg ularExpressions
Imports System.Xml
Imports System.Web
Imports System.Configur ation
Imports System.Web.Http Context
Imports System.Diagnost ics
Namespace codetools

Public Class ErrorHandler
Private Const m_strRootExcept ion As String =
"System.Web.Htt pUnhandledExcep tion"
Public Sub ExceptionToStri ng(ByVal ex As Exception)
Dim sb As New System.Text.Str ingBuilder

With sb
.Append(ex.ToSt ring)
.Append(Excepti onToStringPriva te(ex))
' get ASP specific settings
Try
.Append(GetASPS ettings())
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)
End With

'HttpContext.Cu rrent.Response. Write(sb.ToStri ng)

WriteToEventLog (sb.ToString, "N2C", EventLogEntryTy pe.Error, "N2C")

End Sub

Private Function WriteToEventLog (ByVal Entry As String, _
Optional ByVal AppName As String = "VB.NET Application", _
Optional ByVal EventType As _
EventLogEntryTy pe = EventLogEntryTy pe.Information, _
Optional ByVal LogName As String = "Applicatio n") As Boolean

'************** *************** *************** *************** **
'PURPOSE: Write Entry to Event Log using VB.NET
'PARAMETERS: Entry - Value to Write
' AppName - Name of Client Application. Needed
' because before writing to event log, you must
' have a named EventLog source.
' EventType - Entry Type, from EventLogEntryTy pe
' Structure e.g., EventLogEntryTy pe.Warning,
' EventLogEntryTy pe.Error
' LogName: Name of Log (System, Application;
' Security is read-only) If you
' specify a non-existent log, the log will be
' created

'RETURNS: True if successful, false if not

'EXAMPLES:
'1. Simple Example, Accepting All Defaults
' WriteToEventLog "Hello Event Log"

'2. Specify EventSource, EventType, and LogName
' WriteToEventLog ("Danger, Danger, Danger", "MyVbApp", _
' EventLogEntryTy pe.Warning, "System")
'
'NOTE: EventSources are tightly tied to their log.
' So don't use the same source name for different
' logs, and vice versa
'************** *************** *************** **********

Dim objEventLog As New EventLog

Try
'Register the App as an Event Source
If Not objEventLog.Sou rceExists(AppNa me) Then

objEventLog.Cre ateEventSource( AppName, LogName)
End If

objEventLog.Sou rce = AppName

'WriteEntry is overloaded; this is one
'of 10 ways to call it
objEventLog.Wri teEntry(Entry, EventType)
Return True
Catch Ex As Exception
Return False

End Try

End Function
Private Function ExceptionToStri ngPrivate(ByVal ex As Exception, _
Optional ByVal blnIncludeSysIn fo As Boolean = True) As String

Dim sb As New System.Text.Str ingBuilder

If Not (ex.InnerExcept ion Is Nothing) Then

' sometimes the original exception is wrapped in a more relevant
outer exception
' the detail exception is the "inner" exception
' see
http://msdn.microsoft.com/library/de...ceptdotnet.asp
' don't return the outer root ASP exception; it is redundant.
If ex.GetType.ToSt ring = m_strRootExcept ion Then
Return ExceptionToStri ngPrivate(ex.In nerException)
Else
With sb
.Append(Excepti onToStringPriva te(ex.InnerExce ption, False))
.Append(Environ ment.NewLine)
.Append("(Outer Exception)")
.Append(Environ ment.NewLine)
End With
End If
End If

With sb
' get exception-specific information

.Append("Except ion Type: ")
Try
.Append(ex.GetT ype.FullName)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Message: ")
Try
.Append(ex.Mess age)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Source: ")
Try
.Append(ex.Sour ce)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Target Site: ")
Try
.Append(ex.Targ etSite.Name)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)
End With

Return sb.ToString

End Function

Private Function GetASPSettings( ) As String

Dim sb As New System.Text.Str ingBuilder

With sb
.Append("---- Collections ----")
.Append(Environ ment.NewLine)
.Append(Environ ment.NewLine)
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.Q ueryString,
"QueryStrin g"))
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.F orm,
"Form"))
.Append(GetHttp CookieVars)
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.S erverVariables,
"ServerVariable s", True, "^ALL_HTTP|^ALL _RAW"))
End With

Return sb.ToString

End Function

Private Function GetHttpVars(ByV al NameValueCollec tion As
Specialized.Nam eValueCollectio n, ByVal strTitle As String, _
Optional ByVal blnSuppressEmpt yValues As Boolean = False, _
Optional ByVal strSuppressKeyR egex As String = "") As String

' do we have data in the collection?
If Not NameValueCollec tion.HasKeys Then Return ""

' if so format the data
Dim sb As New System.Text.Str ingBuilder
sb.Append(strTi tle)
sb.Append(Envir onment.NewLine)
sb.Append(Envir onment.NewLine)

Dim blnDisplay As Boolean
Dim strItem As String

' loop through each item in the name value collection
For Each strItem In NameValueCollec tion
blnDisplay = True

' if we need to suppress empty values set display flag based on if
we have data
If blnSuppressEmpt yValues Then
blnDisplay = NameValueCollec tion(strItem) <> String.Empty
End If

' check to see if our regex does not match
If blnDisplay AndAlso strSuppressKeyR egex <> String.Empty Then
blnDisplay = Not Regex.IsMatch(s trItem, strSuppressKeyR egex)
End If

' if conditions where met render item
If blnDisplay Then
AppendLine(sb, strItem, NameValueCollec tion(strItem))
End If

Next

sb.Append(Envir onment.NewLine)
Return sb.ToString

End Function

Private Function AppendLine(ByVa l sb As System.Text.Str ingBuilder, _
ByVal strKey As String, ByVal strValue As String) As String

sb.Append(Strin g.Format(" {0, -30}{1}", strKey, strValue))
sb.Append(Envir onment.NewLine)

End Function

Private Function GetHttpCookieVa rs() As String

' do we have cookies?
If System.Web.Http Context.Current .Request.Cookie s.Count = 0 Then
Return ""

' build formatted cookie information
Dim sb As New System.Text.Str ingBuilder
sb.Append("Cook ies")
sb.Append(Envir onment.NewLine)
sb.Append(Envir onment.NewLine)
Dim strItem As String
For Each strItem In System.Web.Http Context.Current .Request.Cookie s
AppendLine(sb, strItem,
System.Web.Http Context.Current .Request.Cookie s(strItem).Valu e)
Next

sb.Append(Envir onment.NewLine)
Return sb.ToString

End Function

Private Function ProcessIdentity () As String
Dim strTemp As String
strTemp = CurrentWindowsI dentity()
If strTemp = "" Then
strTemp = CurrentEnvironm entIdentity()
End If
Return strTemp
End Function

Private Function CurrentWindowsI dentity() As String
Try
Return System.Security .Principal.Wind owsIdentity.Get Current.Name()
Catch ex As Exception
Return ""
End Try
End Function

Private Function CurrentEnvironm entIdentity() As String
Try
Return System.Environm ent.UserDomainN ame + "\" +
System.Environm ent.UserName
Catch ex As Exception
Return ""
End Try
End Function
Private Function WebCurrentUrl() As String
Dim strUrl As String
With System.Web.Http Context.Current .Request.Server Variables
strUrl = "http://" & .Item("server_n ame")
If .Item("server_p ort") <> "80" Then
strUrl &= ":" & .Item("server_p ort")
End If
strUrl &= .Item("url")
If .Item("query_st ring").Length > 0 Then
strUrl &= "?" & .Item("query_st ring")
End If
End With
Return strUrl
End Function
End Class
End Namespace

Nov 19 '05 #5
Hi,

I am going thru the code.

Meanwhile, one question - are you using impersonation? If yes, then you need
to provide the impersonated user the rights instead of the ASPNET user.

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.rakeshrajan.com/
"Rippo" wrote:
You could be right. I have set the full control permissions for the
asp_net account in reg edit for the event log WriteToEventLog function.
May be it is that that is causing the problem. I will write some code
to see.

Code below in case it could be something else

in web.config
<!-- CUSTOM ERROR MESSAGES -->
<customErrors mode="On" defaultRedirect ="~/Error.aspx" >
<error statusCode="404 " redirect="~/"/>
</customErrors>
in globbal
Sub Application_Err or(ByVal sender As Object, ByVal e As EventArgs)
Dim LastError As Exception = Server.GetLastE rror
ErrorHandler.Ex ceptionToString (LastError)
Server.ClearErr or()
Response.Redire ct("~/Error.html")
End Sub
------------------------------------------------
ErrorHandler.vb

Imports System.Reflecti on
Imports System.Text.Reg ularExpressions
Imports System.Xml
Imports System.Web
Imports System.Configur ation
Imports System.Web.Http Context
Imports System.Diagnost ics
Namespace codetools

Public Class ErrorHandler
Private Const m_strRootExcept ion As String =
"System.Web.Htt pUnhandledExcep tion"
Public Sub ExceptionToStri ng(ByVal ex As Exception)
Dim sb As New System.Text.Str ingBuilder

With sb
.Append(ex.ToSt ring)
.Append(Excepti onToStringPriva te(ex))
' get ASP specific settings
Try
.Append(GetASPS ettings())
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)
End With

'HttpContext.Cu rrent.Response. Write(sb.ToStri ng)

WriteToEventLog (sb.ToString, "N2C", EventLogEntryTy pe.Error, "N2C")

End Sub

Private Function WriteToEventLog (ByVal Entry As String, _
Optional ByVal AppName As String = "VB.NET Application", _
Optional ByVal EventType As _
EventLogEntryTy pe = EventLogEntryTy pe.Information, _
Optional ByVal LogName As String = "Applicatio n") As Boolean

'************** *************** *************** *************** **
'PURPOSE: Write Entry to Event Log using VB.NET
'PARAMETERS: Entry - Value to Write
' AppName - Name of Client Application. Needed
' because before writing to event log, you must
' have a named EventLog source.
' EventType - Entry Type, from EventLogEntryTy pe
' Structure e.g., EventLogEntryTy pe.Warning,
' EventLogEntryTy pe.Error
' LogName: Name of Log (System, Application;
' Security is read-only) If you
' specify a non-existent log, the log will be
' created

'RETURNS: True if successful, false if not

'EXAMPLES:
'1. Simple Example, Accepting All Defaults
' WriteToEventLog "Hello Event Log"

'2. Specify EventSource, EventType, and LogName
' WriteToEventLog ("Danger, Danger, Danger", "MyVbApp", _
' EventLogEntryTy pe.Warning, "System")
'
'NOTE: EventSources are tightly tied to their log.
' So don't use the same source name for different
' logs, and vice versa
'************** *************** *************** **********

Dim objEventLog As New EventLog

Try
'Register the App as an Event Source
If Not objEventLog.Sou rceExists(AppNa me) Then

objEventLog.Cre ateEventSource( AppName, LogName)
End If

objEventLog.Sou rce = AppName

'WriteEntry is overloaded; this is one
'of 10 ways to call it
objEventLog.Wri teEntry(Entry, EventType)
Return True
Catch Ex As Exception
Return False

End Try

End Function
Private Function ExceptionToStri ngPrivate(ByVal ex As Exception, _
Optional ByVal blnIncludeSysIn fo As Boolean = True) As String

Dim sb As New System.Text.Str ingBuilder

If Not (ex.InnerExcept ion Is Nothing) Then

' sometimes the original exception is wrapped in a more relevant
outer exception
' the detail exception is the "inner" exception
' see
http://msdn.microsoft.com/library/de...ceptdotnet.asp
' don't return the outer root ASP exception; it is redundant.
If ex.GetType.ToSt ring = m_strRootExcept ion Then
Return ExceptionToStri ngPrivate(ex.In nerException)
Else
With sb
.Append(Excepti onToStringPriva te(ex.InnerExce ption, False))
.Append(Environ ment.NewLine)
.Append("(Outer Exception)")
.Append(Environ ment.NewLine)
End With
End If
End If

With sb
' get exception-specific information

.Append("Except ion Type: ")
Try
.Append(ex.GetT ype.FullName)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Message: ")
Try
.Append(ex.Mess age)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Source: ")
Try
.Append(ex.Sour ce)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)

.Append("Except ion Target Site: ")
Try
.Append(ex.Targ etSite.Name)
Catch e As Exception
.Append(e.Messa ge)
End Try
.Append(Environ ment.NewLine)
End With

Return sb.ToString

End Function

Private Function GetASPSettings( ) As String

Dim sb As New System.Text.Str ingBuilder

With sb
.Append("---- Collections ----")
.Append(Environ ment.NewLine)
.Append(Environ ment.NewLine)
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.Q ueryString,
"QueryStrin g"))
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.F orm,
"Form"))
.Append(GetHttp CookieVars)
.Append(GetHttp Vars(System.Web .HttpContext.Cu rrent.Request.S erverVariables,
"ServerVariable s", True, "^ALL_HTTP|^ALL _RAW"))
End With

Return sb.ToString

End Function

Private Function GetHttpVars(ByV al NameValueCollec tion As
Specialized.Nam eValueCollectio n, ByVal strTitle As String, _
Optional ByVal blnSuppressEmpt yValues As Boolean = False, _
Optional ByVal strSuppressKeyR egex As String = "") As String

' do we have data in the collection?
If Not NameValueCollec tion.HasKeys Then Return ""

' if so format the data
Dim sb As New System.Text.Str ingBuilder
sb.Append(strTi tle)
sb.Append(Envir onment.NewLine)
sb.Append(Envir onment.NewLine)

Dim blnDisplay As Boolean
Dim strItem As String

' loop through each item in the name value collection
For Each strItem In NameValueCollec tion
blnDisplay = True

' if we need to suppress empty values set display flag based on if
we have data
If blnSuppressEmpt yValues Then
blnDisplay = NameValueCollec tion(strItem) <> String.Empty
End If

' check to see if our regex does not match
If blnDisplay AndAlso strSuppressKeyR egex <> String.Empty Then
blnDisplay = Not Regex.IsMatch(s trItem, strSuppressKeyR egex)
End If

' if conditions where met render item
If blnDisplay Then
AppendLine(sb, strItem, NameValueCollec tion(strItem))
End If

Next

sb.Append(Envir onment.NewLine)
Return sb.ToString

End Function

Private Function AppendLine(ByVa l sb As System.Text.Str ingBuilder, _
ByVal strKey As String, ByVal strValue As String) As String

sb.Append(Strin g.Format(" {0, -30}{1}", strKey, strValue))
sb.Append(Envir onment.NewLine)

End Function

Private Function GetHttpCookieVa rs() As String

' do we have cookies?
If System.Web.Http Context.Current .Request.Cookie s.Count = 0 Then
Return ""

' build formatted cookie information
Dim sb As New System.Text.Str ingBuilder
sb.Append("Cook ies")
sb.Append(Envir onment.NewLine)
sb.Append(Envir onment.NewLine)
Dim strItem As String
For Each strItem In System.Web.Http Context.Current .Request.Cookie s
AppendLine(sb, strItem,
System.Web.Http Context.Current .Request.Cookie s(strItem).Valu e)
Next

sb.Append(Envir onment.NewLine)
Return sb.ToString

End Function

Private Function ProcessIdentity () As String
Dim strTemp As String
strTemp = CurrentWindowsI dentity()
If strTemp = "" Then
strTemp = CurrentEnvironm entIdentity()
End If
Return strTemp
End Function

Private Function CurrentWindowsI dentity() As String
Try

Nov 19 '05 #6
No i am not using impersonation.

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5918
by: Greg Burns | last post by:
I am trying to write a global custom error page. I thought I would jot down some of what I've learned so far... At first I just used the default customErrors section with a defaultRedirect tag, as such: <customErrors defaultRedirect="error.aspx" mode="On" /> First thing I found out about this method, is that I didn't have access to the exception object in my error.aspx page. So this page was going to be
3
3033
by: tafs7 | last post by:
My code below is supposed to email me when an error occurs on the application, but it's not emailing anything. Am I missing something? I know the smtp servers I've tried work. I even added a App_Start handler to see if I could get emailed at all even from the first request of the app, but to no avail. Could someone please help me out? Thanks a lot! --Thiago Web developer AgniTEK
0
1073
by: Michael | last post by:
Hi, I have an ASP.NET application that catches un-handled exceptions in the Application_Error method and writes the details to the Event Log. But, if I do a Server.ClearError() followed by either a Server.Transfer or Response.Redirect to another ASP.NET page, then it causes .NET to re-enter the Application_Error function. I thought that maybe there is an exception being thrown in the Application_Error function, but after placing a...
0
968
by: Michael | last post by:
Hi, I have an ASP.NET application that catches un-handled exceptions in the Application_Error method and writes the details to the Event Log. But, if I do a Server.ClearError() followed by either a Server.Transfer or Response.Redirect to another ASP.NET page, then it causes .NET to re-enter the Application_Error function. I thought that maybe there is an exception being thrown in the Application_Error function, but after placing a...
4
1098
by: Chris Leffer | last post by:
Hi. I have the following code in my Global.asax Application_error event: Dim lgEntryLog As New Logs.Custom Dim exApp As Exception = Server.GetLastError.GetBaseException Try With lgEntryLog .LogFile = "Site.log"
6
4558
by: Matt | last post by:
Can anyone give me a good reason to use BOTH application scope Page_Error and the page scope Page_Error when trapping errors in a web application? Is there any real benefit to using the Page_Error if you are already capturing errors in Application_Error? Also, if you have any links to discussions about when to use which function it would be helpful.
1
1851
by: David Herbst | last post by:
VS 2005 / .NET 2.0 Windows 2000 Server sp4 (on development as well as testing server) Using Web Deployment Project to build assemblies for testing and production servers. I added a Global.asax file to my web site so I could implement a Application_Error() handler. The handler works fine on my development web server but when I deploy it to the testing web server it doesn't execute. Instead I get the detailed ASP.NET error page or my...
0
1503
by: Brian | last post by:
Greetings group! I've got a weird one. I have an ASP.NET 1.1 application that has been running on a dual-processor Windows 2000/IIS 5 server for a couple of years. Global.asax has an Application_Error() function that writes an entry to the event log. Everything works great. We're migrating to Windows 2003 on a new server, so I built up a virtual PC (MS Virtual Server) Win2k3/IIS6 (single processor) box for testing and everything works...
19
5121
by: =?Utf-8?B?anZjb2FjaDIz?= | last post by:
I've got a global.aspx file that works in my dev environment (vs 2005). When i publish the site to a windows 2000 sp4 box running IIS, the global does not seem to fire. Since it's a test server, i've tried granting the user that IIS is using with all kinds of rights, that didn't work.... so is there some setting i'm missing somewhere. Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled...
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.